rsynko-ratatui 0.1.2

Ratatui interpreter of the Rsynko manager, and the keys read back from it
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use rsynko_session::ClockAlg;
use std::time::{Duration, Instant};

/// Reads this machine's own clock, which only ever moves forward.
#[derive(Clone, Copy, Debug, Default)]
pub struct Monotonic;

impl ClockAlg for Monotonic {
    type Moment = Instant;

    fn now(&self) -> Instant {
        Instant::now()
    }

    fn since(&self, moment: &Instant) -> Duration {
        moment.elapsed()
    }
}