public abstract class Clock extends Object
java.time.Clock
.
Implementations should implement Serializable
wherever possible and must document
whether or not they do support serialization.
Constructor and Description |
---|
Clock() |
Modifier and Type | Method and Description |
---|---|
static Clock |
defaultClock()
Returns the default clock.
|
abstract long |
millis()
Returns current time in milliseconds according to this clock.
|
public abstract long millis()
public static Clock defaultClock()
System.currentTimeMillis()
to get time
in milliseconds.Copyright © 2016 Google. All rights reserved.