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

Aaron Boodman aa at google.com
Thu Oct 2 18:50:42 PDT 2008


On Thu, Oct 2, 2008 at 5:05 PM, Maciej Stachowiak <mjs at apple.com> wrote:
> Timer startTimer(double delayInSeconds, bool repeating, Function
> callback);
>
> interface Timer {
>     void stop();
> }

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);

That would make a call look like this:

var timer = startTimer(function() { ... }, 42, true);

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.

- a


More information about the webkit-dev mailing list