Ewout van Bekkum | 3c61ae9 | 2020-10-30 15:52:25 -0700 | [diff] [blame] | 1 | .. _module-pw_chrono: |
| 2 | |
| 3 | --------- |
| 4 | pw_chrono |
| 5 | --------- |
| 6 | Pigweed's chrono module provides facilities for applications to deal with time, |
| 7 | leveraging many pieces of STL's the ``std::chrono`` library but with a focus |
| 8 | on portability for constrained embedded devices and maintaining correctness. |
| 9 | |
| 10 | .. warning:: |
| 11 | This module is under construction, not ready for use, and the documentation |
| 12 | is incomplete. |
| 13 | |
| 14 | SystemClock facade |
| 15 | ------------------ |
| 16 | The ``pw::chrono::SystemClock`` is meant to serve as the clock used for time |
| 17 | bound operations such as thread sleeping, waiting on mutexes/semaphores, etc. |
| 18 | The ``SystemClock`` always uses a signed 64 bit as the underlying type for time |
| 19 | points and durations. This means users do not have to worry about clock overflow |
| 20 | risk as long as rational durations and time points as used, i.e. within a range |
| 21 | of ±292 years. |