public class SystemClock extends Clock
This clock uses System.currentTimeMillis()
for absolute time and System.nanoTime()
for relative time.
This SystemClock exists as a singleton instance.
Modifier and Type | Method and Description |
---|---|
long |
absoluteTimeMillis() |
static SystemClock |
getInstance() |
long |
relativeTimeMillis() |
long |
relativeTimeNanos() |
public static SystemClock getInstance()
public long absoluteTimeMillis()
absoluteTimeMillis
in class Clock
public long relativeTimeMillis()
relativeTimeMillis
in class Clock
public long relativeTimeNanos()
relativeTimeNanos
in class Clock
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.