https://github.com/mguludag/exec_time
A simple C++ header for prints function execution time with RAII, macros and chrono
https://github.com/mguludag/exec_time
chrono cpp macros performance-metrics raii test
Last synced: 4 months ago
JSON representation
A simple C++ header for prints function execution time with RAII, macros and chrono
- Host: GitHub
- URL: https://github.com/mguludag/exec_time
- Owner: mguludag
- License: gpl-3.0
- Created: 2021-09-23T23:58:26.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-09-24T17:41:39.000Z (over 3 years ago)
- Last Synced: 2025-01-03T08:19:47.467Z (5 months ago)
- Topics: chrono, cpp, macros, performance-metrics, raii, test
- Language: C++
- Homepage:
- Size: 31.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# exec_time
A simple C++ header for prints function execution time with RAII, macros and chrono## Usage
```C++
#includeint main()
{
auto et = exec_time_ms;
std::cout << "exec_time_example" << std::endl;
exec_time_elapsed(et); // main from line 11 to 13 executed in 80.765 ms
return 0;
} // main from line 11 to end executed in 90.036 ms
```
### Macros for construct exec_time_impl object
```C++
exec_time_ns;
exec_time_us;
exec_time_ms;
exec_time_s;
exec_time_m;
exec_time_h;
```