{"_id":"@gamestdio/clock","_rev":"4-e337537d710b80fe36d323d48d607af3","name":"@gamestdio/clock","description":"A simple clock/ticker implementation to track elapsed/delta time.","dist-tags":{"latest":"1.1.9"},"versions":{"1.1.7":{"name":"@gamestdio/clock","version":"1.1.7","description":"A simple clock/ticker implementation to track elapsed/delta time.","author":{"name":"Endel Dreyer","email":"endel.dreyer@gmail.com"},"keywords":["clock","ticker","delta","time"],"repository":{"type":"git","url":"git://github.com/endel/clock.js.git"},"main":"./dist/index.js","typings":"./dist/index.d.ts","scripts":{"test":"npm run prepublish && mocha test","prepublish":"rimraf ./dist && tsc"},"license":"MIT","devDependencies":{"assert":"^1.3.0","mocha":"^2.3.3","rimraf":"^2.5.2","typescript":"^2.2.2"},"gitHead":"3c4af91a6616f76fb8b309754ea33148dbb8d4df","bugs":{"url":"https://github.com/endel/clock.js/issues"},"homepage":"https://github.com/endel/clock.js#readme","_id":"@gamestdio/clock@1.1.7","_shasum":"fa7c7c594dd2f31bbe53158e2f7e47dfa40c8d6d","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"endel","email":"endel.dreyer@gmail.com"},"dist":{"shasum":"fa7c7c594dd2f31bbe53158e2f7e47dfa40c8d6d","tarball":"https://registry.npmjs.org/@gamestdio/clock/-/clock-1.1.7.tgz","integrity":"sha512-UR+pbACuVzJ7cpp0vTHoDzd9qcdgt3NCddbWVm6yUpp/tSCHPds5hu09ptz0Pb0RSu6vafrkeuJh9RaSClyWWg==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEs7WHZm1C5BJ7HvXmmq/AseBZ3Tw9hZCLCLYy5r+lyPAiEAtq1X4pexQd53cRxyfPmIG9JKThiguowB2Fq1vq2RVXM="}]},"maintainers":[{"name":"endel","email":"endel.dreyer@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/clock-1.1.7.tgz_1502134745384_0.9954081804025918"}},"1.1.8":{"name":"@gamestdio/clock","version":"1.1.8","description":"A simple clock/ticker implementation to track elapsed/delta time.","author":{"name":"Endel Dreyer","email":"endel.dreyer@gmail.com"},"keywords":["clock","ticker","delta","time"],"repository":{"type":"git","url":"git://github.com/endel/clock.js.git"},"main":"./dist/index.js","typings":"./dist/index.d.ts","scripts":{"test":"npm run prepublish && mocha test","prepublish":"rimraf ./dist && tsc"},"license":"MIT","devDependencies":{"assert":"^1.3.0","mocha":"^2.3.3","rimraf":"^2.5.2","typescript":"^2.2.2"},"gitHead":"3c4af91a6616f76fb8b309754ea33148dbb8d4df","bugs":{"url":"https://github.com/endel/clock.js/issues"},"homepage":"https://github.com/endel/clock.js#readme","_id":"@gamestdio/clock@1.1.8","_shasum":"bf99f2befffa5976c3173fe1de5a52d9dce169ef","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"endel","email":"endel.dreyer@gmail.com"},"dist":{"shasum":"bf99f2befffa5976c3173fe1de5a52d9dce169ef","tarball":"https://registry.npmjs.org/@gamestdio/clock/-/clock-1.1.8.tgz","integrity":"sha512-eOGRNkQmcbAPGWi2va/rRYBBnAMsfAPvdMZ6gilIyT/8hK/BEiATV/jSJecMLDE+mQ8C8Qx5ILOzgsVfAQ8PoA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDQobZiLmgRSduY+jwnPrMyuBFyM0w+o4TfHYzpF1WY9AIhAOOw44jO5ZaXFsrQPLgkbgj8R5mx6fWi9BVVVYQE6u01"}]},"maintainers":[{"name":"endel","email":"endel.dreyer@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/clock-1.1.8.tgz_1502134884633_0.17544557387009263"}},"1.1.9":{"name":"@gamestdio/clock","version":"1.1.9","description":"A simple clock/ticker implementation to track elapsed/delta time.","author":{"name":"Endel Dreyer","email":"endel.dreyer@gmail.com"},"keywords":["clock","ticker","delta","time"],"repository":{"type":"git","url":"git://github.com/endel/clock.js.git"},"main":"./dist/index.js","typings":"./dist/index.d.ts","scripts":{"test":"npm run prepublish && mocha test","prepublish":"rimraf ./dist && tsc"},"license":"MIT","devDependencies":{"assert":"^1.3.0","mocha":"^2.3.3","rimraf":"^2.5.2","typescript":"^2.2.2"},"gitHead":"86db39cf845f91c8324130e9b5e7ef72c8924c8d","bugs":{"url":"https://github.com/endel/clock.js/issues"},"homepage":"https://github.com/endel/clock.js#readme","_id":"@gamestdio/clock@1.1.9","_shasum":"77ec0c011391fbbfdcb4f32112429536fd8680cb","_from":".","_npmVersion":"3.10.8","_nodeVersion":"6.9.1","_npmUser":{"name":"endel","email":"endel.dreyer@gmail.com"},"dist":{"shasum":"77ec0c011391fbbfdcb4f32112429536fd8680cb","tarball":"https://registry.npmjs.org/@gamestdio/clock/-/clock-1.1.9.tgz","integrity":"sha512-O+PG3aRRytgX2BhAPMIhbM2ftq1Q8G4xUrYjEWYM6EmpoKn8oY4lXENGhpgfww6mQxHPbjfWyIAR6Xj3y1+avw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC+qRX7dy7Nn5GU5uncrqcO3oGry2w97eamW8Dzd4tfZAiEAhgpkE0rmQE8fjgh4PkgR1Cted/FiiRQWfZpLVMgS3nM="}]},"maintainers":[{"name":"endel","email":"endel.dreyer@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/clock-1.1.9.tgz_1506567042514_0.5194790386594832"}}},"readme":"@gamestdio/clock [![Build Status](https://secure.travis-ci.org/gamestdio/clock.js.png?branch=master)](http://travis-ci.org/gamestdio/clock.js)\n===\n\nA simple clock/ticker implementation to track delta/elapsed time.\n\n**2kb minified**\n\nAPI\n---\n\n- `new Clock([useInterval=false])`\n- `clock.start([useInterval=false])`\n- `clock.stop()`\n- `clock.tick()`\n- `clock.elapsedTime`\n- `clock.deltaTime`\n- `clock.currentTime`\n\nUsage example\n---\n\nThere's two ways you can use clock.js: manual or automatic.\n\n**Automatic**\n\nBy initializing `Clock` with `true` as the first argument, a interval will be\ncreated, in which `tick()` is called 60 times per second.\n\n```typescript\nimport * as Clock from '@gamestdio/clock';\nlet clock = new Clock(true);\n```\n\nYou can also call `start(true)` to create the interval.\n\n```javascript\nimport * as Clock from '@gamestdio/clock';\nlet clock = new Clock();\nclock.start(true);\n```\n\n**Manual usage**\n\nYou call `tick()` manually in your existing loop.\n\n```typescript\nimport * as Clock from '@gamestdio/clock';\nvar clock = new Clock();\n\nsetInterval(function() {\n  clock.tick();\n  console.log(\"Delta time: \", clock.deltaTime);\n  console.log(\"Elapsed time: \", clock.elapsedTime);\n  console.log(\"Current time: \", clock.currentTime);\n}, 1000 / 60);\n```\n\n\nLicense\n---\n\nMIT\n","maintainers":[{"name":"endel","email":"endel.dreyer@gmail.com"}],"time":{"modified":"2022-06-12T18:22:08.591Z","created":"2017-08-07T19:39:06.254Z","1.1.7":"2017-08-07T19:39:06.254Z","1.1.8":"2017-08-07T19:41:25.496Z","1.1.9":"2017-09-28T02:50:42.605Z"},"homepage":"https://github.com/endel/clock.js#readme","keywords":["clock","ticker","delta","time"],"repository":{"type":"git","url":"git://github.com/endel/clock.js.git"},"author":{"name":"Endel Dreyer","email":"endel.dreyer@gmail.com"},"bugs":{"url":"https://github.com/endel/clock.js/issues"},"license":"MIT","readmeFilename":"README.md"}