tree: 2e9d5b6f65b817dafb1a10b5f426ab75f10237d0 [path history] [tgz]
  1. src/
  2. BUILD.gn
  3. OWNERS
  4. README.md
src/lib/mapped-clock/README.md

Mapped clock

This is a rust library implementing a safe API for a clock backed by memory mapped into this process' virtual address space. See MappedClock for details.

To create one, you will need a zx::Clock, a zx::Vmar and a call to MappedClock::try_new.

A memory mapped clock can be read more efficiently than a regular kernel clock object in contexts where calling into the kernel is undesirable. At the same time, updates to the memory mapped clock can be observed consistently with any other observers of the same underlying clock, a property guaranteed by Zircon.

As a tradeoff, a memory mapped clock may offer a restricted set of methods, and has more complex construction and lifecycle as compared to [zx::Clock].