suspend-time 0.1.2

A cross-platform monotonic clock that is suspend-unaware, written in Rust!
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::time::Instant;

use suspend_time::SuspendUnawareInstant;

fn main() {
    let t1 = Instant::now();

    let z = SuspendUnawareInstant::now();

    let duration = t1.elapsed();

    // dummy print to get the optimizer to keep z around
    println!("dummy print: {:#?}", z.elapsed());

    println!("Took: {:#?}", duration);
}