class ClockFactory

Defined at line 24 of file ../../src/media/audio/services/mixer/fidl/clock_registry.h

An abstract factory for creating clocks and timers. All clocks and timers created by this factory

are members of the same clock "realm", meaning they follow a shared system monotonic clock. In

practice, implementions use either the "real" realm, which follows the real system monotonic

clock, or a SyntheticClockRealm.

Implementations are not safe for concurrent use.

Public Methods

std::shared_ptr<const Clock> SystemMonotonicClock ()

Returns a singleton which represents the system monotonic clock for this realm.

zx::result<std::pair<std::shared_ptr<Clock>, zx::clock>> CreateGraphControlledClock (std::string_view name)

Creates a graph-controlled clock with the given. The return value includes an actual Clock

object along with a zx::clock handle which must have the same koid as the Clock. The returned

Clock must be adjustable. The returned handle must have ZX_RIGHT_DUPLICATE | ZX_RIGHT_TRANSFER

and must not have ZX_RIGHT_WRITE.

Errors:

* Anything returned by zx_clock_create.

zx::result<std::shared_ptr<Clock>> CreateWrappedClock (zx::clock handle, std::string_view name, uint32_t domain, bool adjustable)

Creates a clock which wraps the given zx::clock handle.

Errors:

* Anything returned by zx_clock_create.

* ZX_ERR_NOT_SUPPORTED if the factory doesn't support wrapping zx::clock handles.

std::shared_ptr<Timer> CreateTimer ()

Creates a user-controlled clock with the given properties.

void ~ClockFactory ()

Defined at line 26 of file ../../src/media/audio/services/mixer/fidl/clock_registry.h