RealtimeClock
namespace VideoKit.Clocks {
/// <summary>
/// Clock that generates timestamps in realtime.
/// </summary>
class RealtimeClock : IClock { ... }
}
The RealtimeClock
provides timestamps that advance in realtime.
Creating the Clock
/// <summary>
/// Create a realtime clock.
/// </summary>
RealtimeClock ();
The clock will initialize its internal state.
Generating Timestamps
/// <summary>
/// Current timestamp in nanoseconds.
/// </summary>
long timestamp { get; }
The timestamp
reports the clock's elapsed time in nanoseconds.
Pausing the Clock
/// <summary>
/// Whether the clock paused.
/// </summary>
bool paused { get; set; }
This clock provides a paused
property for pausing and resuming its internal clock.