fun_time

Crates.io docs.rs

fun_time is a simple Rust library that allows you to easily time your function calls with a simple attribute!

Basic example

```rust

[funtime(message = "Heavy calculations on: {avalue}")]

fn somecoolfunction(avalue: String) -> usize { avalue.len() }

fn main() { let myvaluelength = somecoolfunction(String::from("Hello, world.")); } ```

The above will print Starting: Heavy calculations on: Hello, world. when the function starts, and Heavy calculations on: Hello, world.: Done in <duration> on completion.

Configuration

There are various attributes that allow you to configure the behavior of the fun_time attribute.

Reporting

The reported messages are formatted as follows:

Start message: "Starting: YOURMESSAGEHERE"

Done message: "YOURMESSAGEHERE: Done in DURATION"