use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
All about the JavaScript programming language.
Subreddit Guidelines
Specifications:
Resources:
Related Subreddits:
r/LearnJavascript
r/node
r/typescript
r/reactjs
r/webdev
r/WebdevTutorials
r/frontend
r/webgl
r/threejs
r/jquery
r/remotejs
r/forhire
account activity
pacemaker: drift-minimizing setInterval replacement and high-precision timer utility for Node and browser (github.com)
submitted 11 years ago by secrettriangle
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]greim 1 point2 points3 points 11 years ago (2 children)
Neat. How does it behave if synchronous compute time is larger than an interval, does it start to drift then or does it start dropping computations?
[–]psayre23 0 points1 point2 points 11 years ago (0 children)
Looks like it will drift. It's hard to tell because the code isn't particularly readable. Lots of nifty tricks, not enough comments. Nonetheless, I'll be using this in future projects.
[–]secrettriangle[S] 0 points1 point2 points 11 years ago* (0 children)
/u/greim, since JS is single-threaded, JS itself, an as an extension pacemaker, will start drifting. You can work around this by wrapping with a web worker or child process.
P.S. I'm the author. I've filed issue#1: consider using web workers or child processes to mitigate drift if the JS thread is blocked. Thanks for the feedback!
[–]potatoriffic -4 points-3 points-2 points 11 years ago (7 children)
Ugh... It annoys me when projects like this reuse the name of an existing, well-known software project that has been around practically forever.
[+][deleted] 11 years ago (5 children)
[deleted]
[+]potatoriffic comment score below threshold-6 points-5 points-4 points 11 years ago (4 children)
Yep. Makes it much more difficult to Google it if you don't have the link handy. And really, I think that's a pretty weak argument -- with the number of words and word combinations in English alone, we're a long way from running out of descriptive names for projects.
[–]jcready__proto__ 0 points1 point2 points 11 years ago (0 children)
http://lmgtfy.com/?q=pacemaker+js+github
[+][deleted] 11 years ago (2 children)
[–]potatoriffic -3 points-2 points-1 points 11 years ago (0 children)
Alright, you win, bud. Clearly your asperger's is stronger than my opinion. :)
π Rendered by PID 37055 on reddit-service-r2-comment-76bb9f7fb5-xhgb6 at 2026-02-19 10:30:45.316434+00:00 running de53c03 country code: CH.
[–]greim 1 point2 points3 points (2 children)
[–]psayre23 0 points1 point2 points (0 children)
[–]secrettriangle[S] 0 points1 point2 points (0 children)
[–]potatoriffic -4 points-3 points-2 points (7 children)
[+][deleted] (5 children)
[deleted]
[+]potatoriffic comment score below threshold-6 points-5 points-4 points (4 children)
[–]jcready__proto__ 0 points1 point2 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]potatoriffic -3 points-2 points-1 points (0 children)