/bad-timers

example of how not to time requests with koa

Primary LanguageJavaScript

node app.js
# in another terminal
curl http://localhost:3000

Output

Started a timer.
Ended the unreliable timer: 110ms
Ended the accurate timer. Time: 918ms
Started a timer.
Ended the unreliable timer: 828ms
Ended the accurate timer. Time: 838ms