public interface Clock
The default system implementation can be accessed at SYSTEM
. Alternative
implementations may be used for testing.
Modifier and Type | Field and Description |
---|---|
static Clock |
SYSTEM
Provides the default System implementation of a Clock by using
System.currentTimeMillis() . |
Modifier and Type | Method and Description |
---|---|
long |
currentTimeMillis()
Returns the current time in milliseconds since midnight, January 1, 1970 UTC, to match the
behavior of
System.currentTimeMillis() . |
static final Clock SYSTEM
System.currentTimeMillis()
.long currentTimeMillis()
System.currentTimeMillis()
.Copyright © 2011–2023 Google. All rights reserved.