Closed beaumartinez closed 11 years ago
It's not documented, but you can do this with the global interval()
function. $.livestamp.interval()
will return the current interval in seconds. $.livestamp.interval(x)
will set the interval to x
seconds.
That's pretty sweet. Perhaps you should add it to the documentation?
Awesome project BTW.
I'm not sure if commenting on a closed issue is a great idea, but... From looking at the code, it appears that the interval (unlike timestamps) are specified in milliseconds, not seconds. So the default behavior is to update once per second, not once per minute. And calling interval(x) sets the interval to x milliseconds. But maybe I'm missing something?
Once a minute is a sensible default, but I'd like it to be customizable as well—so we could update every five seconds on more "time-sensitive" data, for example.