simple-timer 0.1.0

simple timer macro
Documentation
  • Coverage
  • 50%
    1 out of 2 items documented1 out of 1 items with examples
  • Size
  • Source code size: 3.41 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 981.22 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • hwchen

simple timer

Usage

In Cargo.toml:

[dependencies]
simple-timer = { git = 'https://github.com/hwchen/simple-timer-rs' }

In code:

use simple_timer::timeit;

fn hello_world() {
    println!("hello world");
}

fn main() -> {
    timeit!("time_1", hello_world());
    timeit!("time_two",
        {
            println!("great weather");
            println!("i agree");
        }
    );
    let forty_two = timeit!("three", 42);
    assert_eq!(forty_two, 42);
}

License

MIT