<div dir="ltr">On a separate thread, it was discussed that it is useful to support microsecond resolution for future proofness.<div><br></div><div>-Darin</div><div><br><br><div class="gmail_quote">On Thu, Oct 2, 2008 at 5:53 PM, Timothy Hatcher <span dir="ltr"><<a href="mailto:timothy@hatcher.name">timothy@hatcher.name</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div style="word-wrap:break-word"><div>Why <span style="border-collapse:collapse">double delayInSeconds and not milliseconds to stay consistent?</span></div>
<div><span style="border-collapse:collapse"><br></span></div><div><div><div></div><div class="Wj3C7c"><div>On Oct 2, 2008, at 5:32 PM, Ojan Vafai wrote:</div><br></div></div><blockquote type="cite"><div><div></div><div class="Wj3C7c">
<div dir="ltr"><div class="gmail_quote">On Thu, Oct 2, 2008 at 5:16 PM, Aaron Boodman <span dir="ltr"><<a href="mailto:aa@google.com" target="_blank">aa@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>On Thu, Oct 2, 2008 at 5:05 PM, Maciej Stachowiak <<a href="mailto:mjs@apple.com" target="_blank">mjs@apple.com</a>> wrote:<br> > I don't really like the overengineered version. I like the "fairly<br>
> minimalist" version best, but is there anything from the<br> > overengineered version that should be added to it?<br> <br> </div>I like the "fairly minimalist" version best as well.<br> <br> The stop() method does seem a little lonely on the Timer interface all<br>
by itself.<br> <br> If others think any other members from the "overengineered" version<br> are important I would welcome them to keep stop() company.<br></blockquote><div><br></div><span style="border-collapse:collapse"><div>
+1. My ideal would be the following:</div><div><br></div><div> <span style="border-collapse:collapse">Timer startTimer(double delayInSeconds, bool repeating, Function callback);<br><br>interface Timer {<br> void stop();</span></div>
<div><span style="border-collapse:collapse"> void resume();</span></div> <div><span style="border-collapse:collapse"> void setDelay(double delayInSeconds);<br>}</span></div><div><span style="border-collapse:collapse"><br>
</span></div><div><span style="border-collapse:collapse">That would cover the majority of cases I've seen in real-world javascript code. The argument for setDelay is wanting to be able to tweak the delay on the fly (e.g. Google Page Creator has autosave code that gets a response from the server with a longer delay time when the server is overloaded).</span></div>
<div><span style="border-collapse:collapse"><br></span></div></span><div><span style="border-collapse:collapse">Ojan</span></div></div></div></div></div><div class="Ih2E3d"> _______________________________________________<br>
webkit-dev mailing list<br><a href="mailto:webkit-dev@lists.webkit.org" target="_blank">webkit-dev@lists.webkit.org</a><br><a href="http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev" target="_blank">http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev</a><br>
</div></blockquote></div><br></div><br>_______________________________________________<br>
webkit-dev mailing list<br>
<a href="mailto:webkit-dev@lists.webkit.org">webkit-dev@lists.webkit.org</a><br>
<a href="http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev" target="_blank">http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev</a><br>
<br></blockquote></div><br></div></div>