README.md 644 Bytes
Newer Older
ESTERIE Pierre's avatar
ESTERIE Pierre committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# timers : a collection of helpful timers

:construction: New timers will be added !

# Simple timer example

```cpp
#include <iostream>
#include <cpp_tools/timers/simple_timer.hpp>

...
auto main() -> int
{
    ...

    // default is millisecond
    cpp_tools::timers::timer time{};
    // or cpp_tools::timers::timer<std::chrono::microseconds> time{}; 
    // for timings in milliseconds etc ...

    time.tic();
    // some stuff to time...
    
    // directly : std::cout << " time elapsed : " << time.tac_and_elapsed() << "ms\n";
    // or :

    time.tac();
    std::cout << " time elapsed : " << time.elapsed() << "ms\n";
    ...
}
```