|
YAACC - UPNP Client and Server
|
The client's clock in microseconds. More...


Classes | |
| class | Monotonic |
| The clock on a source of nanoseconds. More... | |
Public Member Functions | |
| long | nowMicros () |
Static Public Member Functions | |
| static MicroClock | monotonic () |
The real clock: System.nanoTime() counted from the first use of this class, so the seconds of a timestamp always fit into the 32 bits of the protocol (a raw nanoTime has an arbitrary origin). | |
| static MicroClock | fromNanoSource (java.util.function.LongSupplier nanos) |
A clock on any source of nanoseconds that never goes back (the source of a test, or Android's SystemClock.elapsedRealtimeNanos(), which keeps counting while the device sleeps). | |
The client's clock in microseconds.
It never goes back and has no meaning of its own (the time sync measures the server clock against it), so tests inject a clock they move by hand.
|
static |
A clock on any source of nanoseconds that never goes back (the source of a test, or Android's SystemClock.elapsedRealtimeNanos(), which keeps counting while the device sleeps).
Time is counted from the moment of the call.
|
static |
The real clock: System.nanoTime() counted from the first use of this class, so the seconds of a timestamp always fit into the 32 bits of the protocol (a raw nanoTime has an arbitrary origin).
On Android that source does not run while the CPU sleeps; the audio engine builds its clock with fromNanoSource and SystemClock.elapsedRealtimeNanos() instead (Group 8).
Referenced by de.yaacc.snapcast.protocol.SnapcastConnection.SnapcastConnection().
