{"action":"opened","issue":{"url":"https://api.github.com/repos/malinkie/node-timers/issues/4","repository_url":"https://api.github.com/repos/malinkie/node-timers","labels_url":"https://api.github.com/repos/malinkie/node-timers/issues/4/labels{/name}","comments_url":"https://api.github.com/repos/malinkie/node-timers/issues/4/comments","events_url":"https://api.github.com/repos/malinkie/node-timers/issues/4/events","html_url":"https://github.com/malinkie/node-timers/issues/4","id":193157983,"number":4,"title":"timer emits 'done' after reset()","user":{"login":"brandonmp","id":14139991,"avatar_url":"https://avatars.githubusercontent.com/u/14139991?v=3","gravatar_id":"","url":"https://api.github.com/users/brandonmp","html_url":"https://github.com/brandonmp","followers_url":"https://api.github.com/users/brandonmp/followers","following_url":"https://api.github.com/users/brandonmp/following{/other_user}","gists_url":"https://api.github.com/users/brandonmp/gists{/gist_id}","starred_url":"https://api.github.com/users/brandonmp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brandonmp/subscriptions","organizations_url":"https://api.github.com/users/brandonmp/orgs","repos_url":"https://api.github.com/users/brandonmp/repos","events_url":"https://api.github.com/users/brandonmp/events{/privacy}","received_events_url":"https://api.github.com/users/brandonmp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-12-02T16:27:05Z","updated_at":"2016-12-02T16:27:05Z","closed_at":null,"body":"i'd like to use a `countdown timer` to apply a timeout to a worker queue i'm building. if worker doesn't reset the timer by `n` milliseconds, the process is killed and a new one is spawned. \r\n\r\nam i doing this right? with the code below, the `done` event is emitted even after `reset()` is successfully called.  the `done` event seems to emit at the originally scheduled time, so it's as if `reset()` is having no effect\r\n\r\n```\r\nlet countdown = require('node-timers/countdown')\r\nlet queueTimer = countdown({ startTime: 5000 })\r\n    queueTimer.start()\r\n    setTimeout(()=> {queueTimer.reset()}, 1500)\r\n    queueTimer.on('reset', () => { console.log('reset', queueTimer.time()) ;queueTimer.start()})\r\n    queueTimer.on('done', () => {\r\n        console.log('done')\r\n     })\r\n```"}}
{"actor":{"display_login":"brandonmp"}}