Provides a timer which can be split.
More...
Go to the source code of this file.
|
using | SUNphi::Clock = std::chrono::steady_clock |
| Machine clock type.
|
|
using | SUNphi::Instant = std::chrono::time_point< Clock > |
| Instant type, defining a moment in time.
|
|
using | SUNphi::Duration = decltype(Instant{}-Instant{}) |
| Difference of time between two moments.
|
|
|
Instant | SUNphi::takeTime () |
| Get current time.
|
|
template<typename U , typename O = double> |
double | SUNphi::durationIn (const Duration &duration) |
| Convert duration into a units of measure. More...
|
|
template<typename O = double> |
double | SUNphi::durationInSec (const Duration &duration) |
| Convert duration into seconds. More...
|
|
template<typename F , typename... Args> |
auto | SUNphi::durationOf (Duration &duration, F &&f, Args &&...args) |
| Returns the duration of executing a function. More...
|
|
template<typename F , typename... Args> |
Duration | SUNphi::durationOf (F &&f, Args &&...args) |
|
Provides a timer which can be split.
Definition in file Timer.hpp.
template<typename U , typename O = double>
double SUNphi::durationIn |
( |
const Duration & |
duration | ) |
|
Convert duration into a units of measure.
- Parameters
-
Definition at line 259 of file Timer.hpp.
template<typename O = double>
double SUNphi::durationInSec |
( |
const Duration & |
duration | ) |
|
Convert duration into seconds.
- Parameters
-
Definition at line 267 of file Timer.hpp.
template<typename F , typename... Args>
auto SUNphi::durationOf |
( |
Duration & |
duration, |
|
|
F && |
f, |
|
|
Args &&... |
args |
|
) |
| |
Returns the duration of executing a function.
Beginning instant
Store the result
- Parameters
-
duration | Variable where to store the duration |
f | Function to execute |
args | Arguments to call |
Definition at line 278 of file Timer.hpp.
template<typename F , typename... Args>
Duration SUNphi::durationOf |
( |
F && |
f, |
|
|
Args &&... |
args |
|
) |
| |
Returns the duration of executing a function
Result of f() is discarded
Result to be returned
- Parameters
-
f | Function to execute |
args | Arguments to call |
Definition at line 302 of file Timer.hpp.