[webkit-dev] High Resolution Timer API proposal(s)
Alex Iskander
alex at ialexi.com
Thu Oct 2 19:08:09 PDT 2008
I agree. "Repeating", it seems to me, should be an optional argument;
the callback and time, on the other hand, are completely necessary.
The default value for "repeating" is probably up for debate. Would
more web developers use it for repitition, or for single-use? For high
resolution purposes (the original purpose of the proposed API), it
seems more likely to be one use only.
Sent from Alex's iPhone
On Oct 2, 2008, at 8:50 PM, "Aaron Boodman" <aa at google.com> wrote:
> 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
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
More information about the webkit-dev
mailing list