Replace currentTime() with monotonicallyIncreasingTime() in WTF and JavaScriptCore [at appropriate places]
Created attachment 208657 [details] Patch
Why?
(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.
Are you saying that monotonicallyIncreasingTime() is faster than currentTime()? If so, how did you measure that?
(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.
Comment on attachment 208657 [details] Patch r=me
Thanks.
Comment on attachment 208657 [details] Patch Clearing flags on attachment: 208657 Committed r154032: <http://trac.webkit.org/changeset/154032>
All reviewed patches have been landed. Closing bug.
The changelog and commit message should have explained the "why".
(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?)
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.