New issue
Advanced search Search tips

Issue 592107 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue 590845



Sign in to add a comment

Remove TimeTicks::UnixEpoch from net/

Project Member Reported by csharrison@chromium.org, Mar 4 2016

Issue description

TimeTicks::UnixEpoch does not always reliably provide the time since the epoch in TimeTicks form. Notably, it does not count time spent in system standby.

As such, it is being deprecated. This issue tracks removal specifically from net/, replacing instances with reasonable alternatives.
 
Owner: csharrison@chromium.org
Status: Assigned (was: Available)
From codesearch, looks like we only use this in two places:
src/net/log/net_log_util.cc
src/net/base/network_quality_estimator_unittest.cc

I can take ownership of this. This doesn't seem hard.
Project Member

Comment 2 by bugdroid1@chromium.org, Mar 11 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/796645a3cfdf37d6f9bde8ba0af644a8950df0cc

commit 796645a3cfdf37d6f9bde8ba0af644a8950df0cc
Author: csharrison <csharrison@chromium.org>
Date: Fri Mar 11 21:04:21 2016

Replace TimeTicks::UnixEpoch with Time::UnixEpoch for the net log
This patch replaces the value of timeTicksOffset for the net log with a value
calculated via:
(Time::Now() - Time::UnixEpoch()) - (TimeTicks::Now() - TimeTicks())

In JS, TimeTicks values calculated via (t - TimeTicks()) are added to the
timeTicksOffset to calculate the wall time that they occurred.

This is equivalent to passing the TimeDelta since the epoch, along with a
reference monotonic time for subsequent TimeTicks values to subtract off.

BUG= 592107 

Review URL: https://codereview.chromium.org/1775663002

Cr-Commit-Position: refs/heads/master@{#380725}

[modify] https://crrev.com/796645a3cfdf37d6f9bde8ba0af644a8950df0cc/net/log/net_log_util.cc

Project Member

Comment 3 by bugdroid1@chromium.org, Mar 29 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d8c96dde9b4e78d75954aba78e96b38fcbbb5ac6

commit d8c96dde9b4e78d75954aba78e96b38fcbbb5ac6
Author: csharrison <csharrison@chromium.org>
Date: Tue Mar 29 16:08:59 2016

Remove TimeTicks::UnixEpoch from net_unittests

BUG= 592107 

Review URL: https://codereview.chromium.org/1841693003

Cr-Commit-Position: refs/heads/master@{#383735}

[modify] https://crrev.com/d8c96dde9b4e78d75954aba78e96b38fcbbb5ac6/net/base/network_quality_estimator_unittest.cc

Status: Fixed (was: Assigned)
Marking as Fixed. There's still some cases of UnixEpoch in net-like areas of the code, but net/ itself is free.

Sign in to add a comment