{"id":22314439,"url":"https://github.com/alvarobernalg/minimal-timer","last_synced_at":"2025-07-29T10:32:59.767Z","repository":{"id":57297883,"uuid":"96146330","full_name":"AlvaroBernalG/minimal-timer","owner":"AlvaroBernalG","description":"Minimal time tracker.","archived":false,"fork":false,"pushed_at":"2017-07-07T10:26:54.000Z","size":60,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-27T08:21:10.965Z","etag":null,"topics":["chronometer","elapsedtime","miliseconds","stopwatch","time","timer","track","tracker"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AlvaroBernalG.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-07-03T20:02:33.000Z","updated_at":"2017-12-30T21:18:39.000Z","dependencies_parsed_at":"2022-09-02T06:30:54.736Z","dependency_job_id":null,"html_url":"https://github.com/AlvaroBernalG/minimal-timer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/AlvaroBernalG/minimal-timer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlvaroBernalG%2Fminimal-timer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlvaroBernalG%2Fminimal-timer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlvaroBernalG%2Fminimal-timer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlvaroBernalG%2Fminimal-timer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AlvaroBernalG","download_url":"https://codeload.github.com/AlvaroBernalG/minimal-timer/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AlvaroBernalG%2Fminimal-timer/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267670458,"owners_count":24125142,"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","status":"online","status_checked_at":"2025-07-29T02:00:12.549Z","response_time":2574,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["chronometer","elapsedtime","miliseconds","stopwatch","time","timer","track","tracker"],"created_at":"2024-12-03T22:10:01.797Z","updated_at":"2025-07-29T10:32:59.388Z","avatar_url":"https://github.com/AlvaroBernalG.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# minimal-timer \n\u003e Keeps track of the elapsed time in miliseconds.\n\n[![Build Status](https://travis-ci.org/AlvaroBernalG/minimal-timer.svg?branch=master)](https://travis-ci.org/AlvaroBernalG/minimal-timer) [![npm version](https://badge.fury.io/js/minimal-timer.svg)](https://badge.fury.io/js/minimal-timer) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com)\n\n## Install\n\n```\n$ npm install minimal-timer --save\n```\n\n## Usage \n\n```js\nconst delay = require('delay')\nconst timer = require('minimal-timer')\n\nconst time = timer() // instantiates the timer\n\ntime.start()\n\nawait delay(500)\n\nconsole.log(time.elapsedTime()) // =\u003e 500 +- \n\ntime.stop()\n\nawait delay(500)\n\nconsole.log(time.elapsedTime()) // =\u003e 500 +- \n\ntime.resume()\n\nawait delay(500)\n\nconsole.log(time.elapsedTime()) // =\u003e 1000 +- \n\n```\n\n## API\n\n### timer() `object`\n\nCreates a new instance \n\n### start(customStartDate[optional]) `void`\n\nStarts/Restart the timer\n\ncustomStartDate `Date` [optional]\n\n### resume() `void`\n\nResumes the timer.\n\n### stop() `number`\n\nStops the timer \n\nReturns the elapsed time in miliseconds\n\n### elapsedTime() `number` \n\nReturns the elapased between the start time and the current  time in miliseconds\n\n### isRunning() `boolean` \n\nReturns true if the timer is running otherwise false \n\n## License\nMIT © [Alvaro Bernal](https://github.com/AlvaroBernalG/) \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvarobernalg%2Fminimal-timer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falvarobernalg%2Fminimal-timer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falvarobernalg%2Fminimal-timer/lists"}