{"_id":"@lichtblick/rostime","_rev":"3-6941812dbbef041f2cf13b05d48ae0bb","name":"@lichtblick/rostime","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@lichtblick/rostime","version":"1.0.0","keywords":["rostime","ros","ros2","robot","operating","system","time","date","duration"],"author":{"name":"Lichtblick","email":"lichtblick@bmwgroup.com"},"license":"MIT","_id":"@lichtblick/rostime@1.0.0","maintainers":[{"name":"lichtblick","email":"lichtblick@bmwgroup.com"}],"homepage":"https://github.com/lichtblick-suite","dist":{"shasum":"90983a92f14d0409bc5168ecb636b8c435e101f6","tarball":"https://registry.npmjs.org/@lichtblick/rostime/-/rostime-1.0.0.tgz","fileCount":26,"integrity":"sha512-D3CbBUo10XRKya16GzX+hpi4s/yZutRGQZEbkxaryHXbNUf0qneHQZMAdgXRqiJWp2uGTp/vBL3dkEsViGgKzg==","signatures":[{"sig":"MEQCIAxc1+H6xyPgp+tQYCmCglalXyUKkT4FDkTe4MJmSbDNAiAunpwHN/6ATV47ccis1XcWmBEbSlTDLJHlchJ2AcqSKg==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":135633},"main":"dist/index.js","engines":{"node":">= 14"},"scripts":{"lint":"eslint --report-unused-disable-directives --fix .","test":"jest","build":"tsc -b","lint:ci":"eslint --report-unused-disable-directives .","prepack":"yarn build","prepublishOnly":"yarn lint:ci && yarn test"},"typings":"dist/index.d.ts","_npmUser":{"name":"lichtblick","email":"lichtblick@bmwgroup.com"},"repository":{"url":"https://github.com/lichtblick-suite/rostime.git","type":"git"},"description":"ROS (Robot Operating System) Time and Duration primitives and helper methods","directories":{},"licenseText":"MIT License\n\nCopyright (c) Foxglove Technologies Inc\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n","_hasShrinkwrap":false,"packageManager":"yarn@1.22.22","devDependencies":{"jest":"29.7.0","eslint":"8.50.0","esbuild":"0.12.15","prettier":"3.3.2","typescript":"5.3.3","@types/jest":"^26.0.23","esbuild-jest":"0.5.0","@types/eslint":"^9.6.1","@types/prettier":"2.3.2","eslint-plugin-es":"^4.1.0","eslint-plugin-jest":"27.6.3","eslint-plugin-import":"2.29.1","eslint-config-prettier":"8.3.0","eslint-plugin-prettier":"5.1.3","eslint-plugin-filenames":"^1.3.2","@lichtblick/eslint-plugin":"^1.0.1","@typescript-eslint/parser":"^6","@types/eslint-plugin-prettier":"^3","@typescript-eslint/eslint-plugin":"^6"},"_npmOperationalInternal":{"tmp":"tmp/rostime_1.0.0_1726818404455_0.5679835682230945","host":"s3://npm-registry-packages"}}},"time":{"created":"2024-09-20T07:46:44.366Z","modified":"2026-04-02T10:23:10.567Z","1.0.0":"2024-09-20T07:46:44.656Z"},"author":{"name":"Lichtblick","email":"lichtblick@bmwgroup.com"},"license":"MIT","homepage":"https://github.com/lichtblick-suite","keywords":["rostime","ros","ros2","robot","operating","system","time","date","duration"],"repository":{"url":"https://github.com/lichtblick-suite/rostime.git","type":"git"},"description":"ROS (Robot Operating System) Time and Duration primitives and helper methods","maintainers":[{"email":"luiz.bezerra@ctw.bmwgroup.com","name":"luiz-bezerra"},{"email":"gabriela.almeida@ctw.bmwgroup.com","name":"gabriela-almeida-ctw"},{"email":"joao.luis@ctw.bmwgroup.com","name":"ctw-joaomluis"},{"email":"lichtblick@bmwgroup.com","name":"lichtblick-suite"},{"email":"rodrigo.PE.rodrigues@ctw.bmwgroup.com","name":"rodrigo-rodrigues-ctw"}],"readme":"# @lichtblick/rostime\n\n> _ROS (Robot Operating System) Time and Duration primitives and helper methods_\n\n[![npm version](https://img.shields.io/npm/v/@lichtblick/rostime.svg?style=flat)](https://www.npmjs.com/package/@lichtblick/rostime)\n\n## Introduction\n\n[ROS](https://www.ros.org/) (Robot Operating System) defines two primitive types for dealing with time, `ros::Time` and `ros::Duration` (see http://wiki.ros.org/roscpp/Overview/Time). These are both represented by the same data type, `{ sec: number; nsec: number }` and serialized as a pair of 32-bit integers (seconds, then nanoseconds). This package provides a TypeScript type definition for these types and helper methods for working with ROS time and duration values.\n\n## Usage\n\n```Typescript\nimport * as rostime from \"@lichtblick/rostime\";\n\nconst a = { sec: 1, nsec: 0 };\nconst b = rostime.fixTime({ sec: 0, nsec: 1e9 });\nconsole.log(`${rostime.toString(a)} == ${rostime.toString(b)} (${rostime.areEqual(a, b)})`);\n```\n\n## License\n\n@lichtblick/rostime is licensed under the [MIT License](https://opensource.org/licenses/MIT).\n\n## Releasing\n\n1. Run `yarn version --[major|minor|patch]` to bump version\n2. Run `git push && git push --tags` to push new tag\n3. GitHub Actions will take care of the rest\n","readmeFilename":"README.md"}