timing Namespace Reference
|
CPP API
|
mio::timing Namespace Reference
Namespaces | |
| details | |
Classes | |
| class | AutoTimer |
| Timer that automatically starts when it is created, and stops when it is destroyed. More... | |
| class | BasicTimer |
| A minimal timer class. More... | |
| struct | ListPrinter |
| class | NamedTimer |
| Thread local singleton timer, identified by its name. Best used via AutoTimer. More... | |
| struct | Printer |
| Struct with a virtual print method to allow exchanging how TimerRegistrations are evaluated. More... | |
| class | TablePrinter |
| class | TimerRegistrar |
| TimerRegistrar is a singleton to keep track of and print timers. Does not manage storage. More... | |
| struct | TimerRegistration |
| Struct used to register (. More... | |
Typedefs | |
| using | DurationType = std::chrono::steady_clock::duration |
| using | TimeType = std::chrono::steady_clock::time_point |
Functions | |
| AutoTimer (BasicTimer &timer) -> AutoTimer<""> | |
| TimeType | get_time_now () |
| Get the current time. More... | |
| std::string | qualified_name (const std::string &name, const std::string &scope) |
| If scope is empty, returns name. More... | |
| double | time_in_seconds (DurationType duration) |
| Convert a duration to a (floating point) number of seconds. More... | |
Typedef Documentation
◆ DurationType
| using mio::timing::DurationType = typedef std::chrono::steady_clock::duration |
◆ TimeType
| using mio::timing::TimeType = typedef std::chrono::steady_clock::time_point |
Function Documentation
◆ AutoTimer()
| mio::timing::AutoTimer | ( | BasicTimer & | timer | ) | -> AutoTimer<""> |
◆ get_time_now()
| TimeType mio::timing::get_time_now | ( | ) |
Get the current time.
- Returns
- Returns omp_get_wtime() if OpenMP is enabled, steady_clock::now() otherwise.
◆ qualified_name()
|
inline |
If scope is empty, returns name.
Otherwise, concatenates scope, two colons "::" and name.
- Parameters
-
[in] name,scope Any strings.
- Returns
- The qualified name given by name and scope.
◆ time_in_seconds()
| double mio::timing::time_in_seconds | ( | DurationType | duration | ) |
Convert a duration to a (floating point) number of seconds.
- Parameters
-
[in] duration Any DurationType value, mainly BasicTimer::get_elapsed_time().
- Returns
- The duration in seconds.
Generated by