node-toobusy icon indicating copy to clipboard operation
node-toobusy copied to clipboard

Getting the lag value

Open jochenonline opened this issue 12 years ago • 3 comments

Is there a chance to not only get a true or false on toobusy(), but also the measured lag time? This could be used to have a ongoing measurement of the loop's load.

jochenonline avatar Aug 31 '13 18:08 jochenonline

I'm adding a +1 for this. I would love to be able to get back a number. This could be <= to the threshold set. I would like to call toobusy(300) and plot the values over time.

jaybaker avatar Sep 04 '13 15:09 jaybaker

+1 as well.

adrianpike avatar Sep 06 '13 16:09 adrianpike

After some brief code spelunking, I realized it's already there:

toobusy = require 'toobusy'
toobusy.lag()

adrianpike avatar Sep 30 '13 17:09 adrianpike