{"id":15313998,"url":"https://github.com/vanruesc/overtime","last_synced_at":"2025-10-08T23:32:18.864Z","repository":{"id":31679903,"uuid":"35245453","full_name":"vanruesc/overtime","owner":"vanruesc","description":"A stopwatch library that visualises time limits in 2D.","archived":true,"fork":false,"pushed_at":"2015-11-11T23:21:13.000Z","size":404,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-09T20:32:48.337Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"zlib","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vanruesc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-07T21:53:24.000Z","updated_at":"2023-01-28T20:36:45.000Z","dependencies_parsed_at":"2022-09-06T18:01:01.342Z","dependency_job_id":null,"html_url":"https://github.com/vanruesc/overtime","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanruesc%2Fovertime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanruesc%2Fovertime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanruesc%2Fovertime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vanruesc%2Fovertime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vanruesc","download_url":"https://codeload.github.com/vanruesc/overtime/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233484531,"owners_count":18683099,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-01T08:44:05.471Z","updated_at":"2025-10-08T23:32:13.520Z","avatar_url":"https://github.com/vanruesc.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Overtime \n[![Build status](https://travis-ci.org/vanruesc/overtime.svg?branch=master)](https://travis-ci.org/vanruesc/overtime) \n[![Windows build status](https://ci.appveyor.com/api/projects/status/t7fv9k65w0wmyfea?svg=true)](https://ci.appveyor.com/project/vanruesc/overtime) \n[![GitHub version](https://badge.fury.io/gh/vanruesc%2Fovertime.svg)](http://badge.fury.io/gh/vanruesc%2Fovertime) \n[![npm version](https://badge.fury.io/js/overtime.svg)](http://badge.fury.io/js/overtime) \n[![Dependencies](https://david-dm.org/vanruesc/overtime.svg?branch=master)](https://david-dm.org/vanruesc/overtime)\n\nOvertime is a stopwatch library that visualises time limits in 2D by using the Canvas API.\n\n\n## Installation\n\nDownload the [minified library](http://vanruesc.github.io/overtime/build/overtime.min.js) and include it in your project:\n\n```html\n\u003cscript src=\"/js/overtime.min.js\"\u003e\u003c/script\u003e\n```\n\nYou can also install it with [npm](https://www.npmjs.com).\n\n```sh\n$ npm install overtime\n``` \n\n\n## Usage\n\n```javascript\nimport Overtime from \"overtime\";\n\n// Create an Overtime instance.\nvar overtime = new Overtime({\n\ttime: 5,\n\ttimeMeasure: Overtime.TimeMeasure.MINUTES,\n\tsize: [300, 300]\n});\n\n/*\n * In order to append the canvas of Overtime to your \n * website, you'll have to listen for the document's\n * \"DOMContentLoaded\"-event.\n *\n * If you want to rely on the sizes of DOM elements \n * such as the body of your page, you should use the\n * \"load\"-event of the window object instead.\n */\n\ndocument.addEventListener(\"DOMContentLoaded\", function init() {\n\n\t// Grab the output canvas and put it on the page.\n\tdocument.getElementById(\"myContainer\").appendChild(overtime.canvas);\n\n\t// Do something when the time elapsed.\n\tovertime.addEventListener(\"elapsed\", function() {\n\n\t\tconsole.log(\"Time's up!\");\n\n\t});\n\n\t// Control Overtime.\n\tovertime.stop();\n\tovertime.start();\n\tovertime.rewind();\n\tovertime.rewindBy(Number.MAX_VALUE);\n\tovertime.fastForwardBy(2);\n\tovertime.prolongBy(2);\n\tovertime.timeMeasure = Overtime.TimeMeasure.MILISECONDS;\n\tovertime.shortenBy(100);\n\tovertime.timeMeasure = Overtime.TimeMeasure.HOURS;\n\tovertime.time = 1;\n\n\t// Clean up.\n\tdocument.removeEventListener(\"DOMContentLoaded\", init);\n\n});\n```\n\n## Example\nTake a look at the [demo](https://vanruesc.github.io/overtime/demo) to see how Overtime works.\n\n\n## Documentation\n[API](http://vanruesc.github.io/overtime/docs)\n\n\n## Contributing\nMaintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.\n\n\n## License\nCopyright (c) 2015 Raoul van Rüschen  \nLicensed under the Zlib license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvanruesc%2Fovertime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvanruesc%2Fovertime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvanruesc%2Fovertime/lists"}