[webkit-dev] High Resolution Timer API proposal(s)

Peter Kasting pkasting at chromium.org
Thu Oct 2 18:12:27 PDT 2008


On Thu, Oct 2, 2008 at 5:59 PM, Maciej Stachowiak <mjs at apple.com> wrote:
>
> I briefly considered cases like that, but I thought it seemed simple enough
> to just cancel the existing timer and start a new one. And it seemed
> uncommon enough to me that it didn't need a direct affordance in the API
> instead of just making a new timer.
>

The counter-use case I would have would be wanting to lengthen a timer
that's already running; e.g. you set a timer for 1 second, and at some point
while it's waiting to go off you realize you need to lengthen it to 2
seconds.  If you have to cancel and reset, you also have to track separately
just how much time has elapsed so you know how to do this.

On Thu, Oct 2, 2008 at 6:06 PM, Aaron Boodman <aa at google.com> wrote:

> It seems safe to assume that a large number of timers are going to be
> on the order of 1-10ms. Because of this I think that millisecond units
> (which can also be fractional) would be best. It also is nice because
> it is consistent with the current API.


Most of the setTimeout()/setInterval() calls I saw in surveying the web the
other day were for some round fraction of a second: 0.1, 0.5, 1, or 2
seconds.  I don't think this would change too much.  And fractional seconds
doesn't make my head hurt the way fractional milliseconds does.

PK
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.webkit.org/pipermail/webkit-dev/attachments/20081002/6cf6d9b5/attachment.html 


More information about the webkit-dev mailing list