class ClockSnapshots

Defined at line 63 of file ../../src/media/audio/lib/clock/clock_snapshot.h

This class provides a way to snapshot multiple clocks at once.

Not safe for concurrent use.

Public Methods

ClockSnapshot SnapshotFor (zx_koid_t clock_koid)

Returns the most recent snapshot for the clock with the given koid.

Update must have been called since this clock was added.

Defined at line 14 of file ../../src/media/audio/lib/clock/clock_snapshot.cc

ClockSnapshot SnapshotFor (UnreadableClock clock)

Defined at line 21 of file ../../src/media/audio/lib/clock/clock_snapshot.cc

void AddClock (std::shared_ptr<const Clock> clock)

Adds a clock to snapshot in future calls to Update.

REQUIRES: A clock with the same koid has not already been added.

Defined at line 25 of file ../../src/media/audio/lib/clock/clock_snapshot.cc

void RemoveClock (std::shared_ptr<const Clock> clock)

Removes a clock from this container.

REQUIRES: A clock with the same koid has been added.

Defined at line 33 of file ../../src/media/audio/lib/clock/clock_snapshot.cc

void Update (zx::time mono_now)

Update the snapshot of every clock.

Defined at line 37 of file ../../src/media/audio/lib/clock/clock_snapshot.cc