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

Peter Speck speck at vitality.dk
Fri Oct 3 06:17:44 PDT 2008


On 03/10/2008, at 03:50, Aaron Boodman wrote:

> One other random idea. What about mixing up the param order for
> parallelism with the existing timer APIs:
>
> Timer startTimer(Function callback, double delay, bool repeating);
> [...]
> Which feels more familiar, but at the same timer better. Less new
> things to remember. Also, I think this argues for the unit to continue
> being milliseconds, again, for familiarity.


Agree on both terms.   Fractional milliseconds are awkward when coming  
from a Cocoa programming world, but in the html/JS world the basic  
unit of time is milliseconds: the Date object uses milliseconds,  
whereas Cocoa's NSDate uses seconds.

Having the same parameters as current API but with duration in seconds  
rather than milliseconds will create lots of bugs for web-developers.  
That's would be a definite gotcha.

----
    - Peter Speck




More information about the webkit-dev mailing list