public abstract class TimeSource extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
TimeSource.CurrentTimeSource
Implementation that uses
System.currentTimeMillis(). |
static class |
TimeSource.NanoTimeSource
Implementation that uses
System.nanoTime(). |
| Modifier and Type | Field and Description |
|---|---|
static TimeSource |
CURRENT_TIME
This instance uses
TimeSource.CurrentTimeSource for generating timestamps. |
static TimeSource |
NANO_TIME
This instance uses
TimeSource.NanoTimeSource for generating timestamps. |
| Constructor and Description |
|---|
TimeSource() |
| Modifier and Type | Method and Description |
|---|---|
abstract long |
getTime()
Return a timestamp, in nanosecond unit.
|
public static final TimeSource CURRENT_TIME
TimeSource.CurrentTimeSource for generating timestamps.public static final TimeSource NANO_TIME
TimeSource.NanoTimeSource for generating timestamps.Copyright © 2000-2017 Apache Software Foundation. All Rights Reserved.