YAACC - UPNP Client and Server
Loading...
Searching...
No Matches
de.yaacc.sendspin.hub.HubClock Interface Reference

The clock of the server role: microseconds on a monotonic clock, which is the time domain of every timestamp the server sends (the protocol does not need the epoch, only one clock for server/time, server_transmitted and the chunk timestamps). More...

Collaboration diagram for de.yaacc.sendspin.hub.HubClock:
Collaboration graph

Public Member Functions

long nowMicros ()
 
void sleepMicros (long micros) throws InterruptedException
 Waits for about this long; may return early on an interrupt (which is thrown).
 

Public Attributes

HubClock SYSTEM
 

Detailed Description

The clock of the server role: microseconds on a monotonic clock, which is the time domain of every timestamp the server sends (the protocol does not need the epoch, only one clock for server/time, server_transmitted and the chunk timestamps).

Sleeping is part of it so that a test can run the pacing without waiting.

Member Data Documentation

◆ SYSTEM

HubClock de.yaacc.sendspin.hub.HubClock.SYSTEM
Initial value:
= new HubClock() {
@Override
public long nowMicros() {
return System.nanoTime() / 1000L;
}
@Override
public void sleepMicros(long micros) throws InterruptedException {
if (micros > 0) {
Thread.sleep(micros / 1000L, (int) ((micros % 1000L) * 1000L));
}
}
}
void sleepMicros(long micros)
Waits for about this long; may return early on an interrupt (which is thrown).

The documentation for this interface was generated from the following file: