https://codereview.chromium.org/51333007/diff/1/src/platform/time.cc
File src/platform/time.cc (right):

https://codereview.chromium.org/51333007/diff/1/src/platform/time.cc#newcode305
src/platform/time.cc:305: Time Time::Now() {
On 2013/10/30 13:50:04, Benedikt Meurer wrote:
CLOCK_MONOTONIC != CLOCK_REALTIME. Time values have to use the
realtime clock.

Trying to deepen my understanding here.  Is that because the return
value of Date.now() is backed by Time::Now()?

https://codereview.chromium.org/51333007/diff/1/src/platform/time.cc#newcode606
src/platform/time.cc:606: int result = GetBestMonotonicClock(&ts);
On 2013/10/30 13:50:04, Benedikt Meurer wrote:
     static clockid_t clockid;
     if (!clockid) {
#ifdef CLOCK_MONOTONIC_COARSE
         if (clock_getres(CLOCK_MONOTONIC_COARSE, &tp) == 0 &&
             (tp.tv_nsec / 1000) <= 1000 &&
             clock_gettime(CLOCK_MONOTONIC_COARSE, &tp) == 0)
             clockid = CLOCK_MONOTONIC_COARSE;
         else
#endif
             clockid = CLOCK_MONOTONIC;
     }
     int result = clock_gettime(clockid, &tp);

I'm a man of many qualities but mind reading is not one of them.  I know
the code but what in particular are the relevant bits?  The call to
clock_getres()?

https://codereview.chromium.org/51333007/

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to