Chromium Code Reviews| Index: net/log/net_log_util.cc |
| diff --git a/net/log/net_log_util.cc b/net/log/net_log_util.cc |
| index 4d4dfa66f644ffad9a5756cae6ed2ef03d6f13d5..a1a0e7e836c16f6f54be6683c765ff024eddc538 100644 |
| --- a/net/log/net_log_util.cc |
| +++ b/net/log/net_log_util.cc |
| @@ -275,9 +275,15 @@ scoped_ptr<base::DictionaryValue> GetNetConstants() { |
| // Information about how the "time ticks" values we have given it relate to |
| // actual system times. Time ticks are used throughout since they are stable |
| // across system clock changes. |
| + // Note: |timeTickOffset| is only comparable to TimeTicks values, converted to |
| + // milliseconds by subtracting the null TimeTicks. |
|
eroman
2016/03/08 00:11:04
I am not sure what this comment means. Subtracting
Charlie Harrison
2016/03/08 01:14:46
Yeah that's what I meant. I thought saying somethi
|
| { |
| + base::TimeDelta time_since_epoch = |
| + base::Time::Now() - base::Time::UnixEpoch(); |
| + base::TimeDelta reference_time_ticks = |
| + base::TimeTicks::Now() - base::TimeTicks(); |
| int64_t tick_to_unix_time_ms = |
| - (base::TimeTicks() - base::TimeTicks::UnixEpoch()).InMilliseconds(); |
| + (time_since_epoch - reference_time_ticks).InMilliseconds(); |
| // Pass it as a string, since it may be too large to fit in an integer. |
| constants_dict->SetString("timeTickOffset", |
|
charliea (OOO until 10-5)
2016/03/08 17:01:42
Am I right in that we're just trying to do a drop-
Charlie Harrison
2016/03/08 17:13:41
I'm not sure why this operation is as flawed as yo
|