New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 871717 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Task



Sign in to add a comment

Create a TimeStamp class to avoid confusion of what time is used

Project Member Reported by mvanouwe...@chromium.org, Aug 7

Issue description

We should create a TimeStamp class to avoid confusion of what time is used. Currently we have lots of places that expect something like a "long timestamp" without specifying whether this is currentTimeMillis, elapseRealTime, uptimeMillis, or something else.

Something like this might work:

class TimeStamp {
  public TimeStamp() {
    // Uses appropriate method to determine "now".
  }

  public long getElapsedMillis() {
    // Uses matching method to determine duration.
  }
}
 

Sign in to add a comment