Package net.time4j.scale
Interface TickProvider
public interface TickProvider
This SPI-interface describes how nanoseconds since an arbitrary start time are generated.
Will be evaluated during loading of the class SystemClock
. The internal standard
implementation uses System.nanoTime()
.
Note: All implementations must have a public no-arg constructor.
- Since:
- 3.2/4.1
- Author:
- Meno Hochschild
-
Method Summary
Modifier and TypeMethodDescriptionlong
getNanos()
Generates a count of nanoseconds.Determines the name of the platform where this implementation should be used.
-
Method Details
-
getPlatform
String getPlatform()Determines the name of the platform where this implementation should be used.
- Returns:
- name of suitable platform which is equivalent to the system property "java.vm.name"
- Since:
- 3.2/4.1
-
getNanos
long getNanos()Generates a count of nanoseconds.
- Returns:
- count of nanosecond ticks since an arbitrary but fixed start time which is typically the boot time
- Since:
- 3.2/4.1
-