RESOLVED FIXED Bug 119762
Replace currentTime() with monotonicallyIncreasingTime() in WTF and JavaScriptCore
https://bugs.webkit.org/show_bug.cgi?id=119762
Summary Replace currentTime() with monotonicallyIncreasingTime() in WTF and JavaScrip...
Arunprasad Rajkumar
Reported 2013-08-13 11:16:14 PDT
Replace currentTime() with monotonicallyIncreasingTime() in WTF and JavaScriptCore [at appropriate places]
Attachments
Patch (6.37 KB, patch)
2013-08-13 11:19 PDT, Arunprasad Rajkumar
no flags
Arunprasad Rajkumar
Comment 1 2013-08-13 11:19:38 PDT
Geoffrey Garen
Comment 2 2013-08-13 11:26:33 PDT
Why?
Arunprasad Rajkumar
Comment 3 2013-08-13 12:12:16 PDT
(In reply to comment #2) > Why? Actually some platforms(mostly embedded systems like TV/STB) doesn't have battery powered reliable clock source. Wall Clock time is obtained via time sources like NTP(it may have some latency). So I feel use currentTime() only on the places which really needs wall clock time(like jsDateTime()), remaining places monotonicallyIncreasingTime() is good.
Geoffrey Garen
Comment 4 2013-08-13 15:44:56 PDT
Are you saying that monotonicallyIncreasingTime() is faster than currentTime()? If so, how did you measure that?
Darin Adler
Comment 5 2013-08-13 16:40:44 PDT
(In reply to comment #4) > Are you saying that monotonicallyIncreasingTime() is faster than currentTime()? If so, how did you measure that? No he’s not saying that. He’s saying that on his platform, monotonicallyIncreasingTime has higher resolution than currentTime.
Geoffrey Garen
Comment 6 2013-08-13 17:27:03 PDT
Comment on attachment 208657 [details] Patch r=me
Geoffrey Garen
Comment 7 2013-08-13 17:27:18 PDT
Thanks.
WebKit Commit Bot
Comment 8 2013-08-13 17:50:19 PDT
Comment on attachment 208657 [details] Patch Clearing flags on attachment: 208657 Committed r154032: <http://trac.webkit.org/changeset/154032>
WebKit Commit Bot
Comment 9 2013-08-13 17:50:21 PDT
All reviewed patches have been landed. Closing bug.
Simon Fraser (smfr)
Comment 10 2013-08-13 18:19:03 PDT
The changelog and commit message should have explained the "why".
Arunprasad Rajkumar
Comment 11 2013-08-13 22:59:25 PDT
(In reply to comment #10) > The changelog and commit message should have explained the "why". Simon, sorry for not including details. I will add more details while doing the change for WebCore.(Or is it possible to change the commit message?)
Darin Adler
Comment 12 2013-08-14 10:20:11 PDT
I think comments in the header with monotonicallyIncreasingTime and currentTime should explain the guidelines for when to use each. That’s where the “why” would go.
Note You need to log in before you can comment on or make changes to this bug.