RESOLVED FIXED 23207
Move currentTime() from WebCore into WTF (to use in WTF::MessageQueue::WaitForMessageTimed)
https://bugs.webkit.org/show_bug.cgi?id=23207
Summary Move currentTime() from WebCore into WTF (to use in WTF::MessageQueue::WaitFo...
Dmitry Titov
Reported 2009-01-08 22:25:37 PST
Combined implementations of currentTime() from several platform-dependent files in WebCore/platform and from JSC/runtime/DateMath.cpp into JSC/WTF/CurrentTime.(h,cpp) This brings all implementations close to each other, eliminates duplication and allows to sue currentTime() anywhere in the project, including WTF itself, in particulr to implement WTF::MessageQueue::WaitForMessageTimed and correct implementation of ThreadCondition::waitTimed() - those changes are following.
Attachments
Proposed patch (57.33 KB, patch)
2009-01-08 23:24 PST, Dmitry Titov
darin: review+
Updated patch (57.26 KB, patch)
2009-01-10 18:34 PST, Dmitry Titov
no flags
Dmitry Titov
Comment 1 2009-01-08 23:24:32 PST
Created attachment 26560 [details] Proposed patch Although there are many files, most of the files in this patch only have a different header file included.
Darin Adler
Comment 2 2009-01-10 14:34:23 PST
Comment on attachment 26560 [details] Proposed patch > +// Platform note: GTK should use gettimeofday everywhere except WIN, where Sentence fragment here. Also, I think it might be better to put this comment after the includes rather than in the middle of them. > +#if PLATFORM(MAC) > +double currentTime() > +{ > + return CFAbsoluteTimeGetCurrent() + kCFAbsoluteTimeIntervalSince1970; > +} > +#elif PLATFORM(WIN) I think some blank lines here would make it easier to read. The per-platform sections are large enough that a little more vertical whitespace will make it easier to spot the boundaries. r=me
Dmitry Titov
Comment 3 2009-01-10 18:34:19 PST
Created attachment 26596 [details] Updated patch Fixed comment, whitespaces and resolved against current tree. Seems to be ready for landing.
Alexey Proskuryakov
Comment 4 2009-01-11 00:15:57 PST
Committed revision 39784.
Note You need to log in before you can comment on or make changes to this bug.