This crate help you to measure time taken by a function or a block of code for "print" debugging purpose. It output in stdout (using println
) the elapsed time.
```rust
extern crate elapsed_time;
fn main() { // measure time taken by a block #[elapsedtime::elapsedblock(blockname1)] { // some piece of code in a function } my_func(); }
// measure time taken by a function
fn myfunc() -> String { }
Produce following logs:
blockname1 tooks 793.515574ms
myfunc tooks 28.855µs
```