diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-11-13 20:20:30 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-13 20:20:30 +0000 |
| commit | e28294b22088298f94197fdbdea39ac816920514 (patch) | |
| tree | afa9bb7300400bb4e1b4a62017b6a983232a0bc1 | |
| parent | 85463ed6c33629866f3977d2093ab3424a5a1b6e (diff) | |
| parent | 2441b7e38978f3fa8d555ee85f2632176e0a2c86 (diff) | |
Merge #271
271: Minor docs update to monotonic r=japaric a=korken89
Co-authored-by: Emil Fresk <emil.fresk@gmail.com>
| -rw-r--r-- | src/lib.rs | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -128,10 +128,12 @@ pub struct Fraction { /// A monotonic clock / counter pub trait Monotonic { - /// A measurement of this clock + /// A measurement of this clock, use `CYCCNT` as a reference implementation for `Instant`. + /// Note that the Instant must be a signed value such as `i32`. type Instant: Copy + Ord + Sub; - /// The ratio between the SysTick (system timer) frequency and this clock frequency + /// The ratio between the system timer (SysTick) frequency and this clock frequency, i.e. + /// `Monotonic clock * Fraction = System clock` /// /// The ratio must be expressed in *reduced* `Fraction` form to prevent overflows. That is /// `2 / 3` instead of `4 / 6` |
