control a set of named stop watch like timers
More...
#include <stopwatch.hh>
control a set of named stop watch like timers
◆ StopWatch()
LocARNA::StopWatch::StopWatch |
( |
bool |
print_on_exit = false | ) |
|
|
explicit |
Constructor.
- Parameters
-
print_on_exit | whether to automatically print times on exit |
◆ current_cycles()
size_t LocARNA::StopWatch::current_cycles |
( |
const std::string & |
name | ) |
const |
current start/stop cycles of a named timer
- Parameters
-
- Returns
- cycles (including started cycle if running)
◆ current_total()
double LocARNA::StopWatch::current_total |
( |
const std::string & |
name | ) |
const |
current total time of a named timer
- Parameters
-
- Returns
- time (if running add time since start)
◆ is_running()
bool LocARNA::StopWatch::is_running |
( |
const std::string & |
name | ) |
const |
test whether named timer is running
- Parameters
-
- Returns
- running?
◆ print_info() [1/2]
std::ostream & LocARNA::StopWatch::print_info |
( |
std::ostream & |
out | ) |
const |
print information for all timers
- Parameters
-
- Returns
- output stream
◆ print_info() [2/2]
std::ostream & LocARNA::StopWatch::print_info |
( |
std::ostream & |
out, |
|
|
const std::string & |
name |
|
) |
| const |
print information for one timer
- Parameters
-
- Note
- determine current running time for running timers
- Returns
- output stream
◆ set_print_on_exit()
void LocARNA::StopWatch::set_print_on_exit |
( |
bool |
print_on_exit | ) |
|
Control automatic printing of times at exit
- Parameters
-
print_on_exit | whether to print on exit |
◆ start()
bool LocARNA::StopWatch::start |
( |
const std::string & |
name | ) |
|
start a named timer
- Parameters
-
- Returns
- success
◆ stop()
bool LocARNA::StopWatch::stop |
( |
const std::string & |
name | ) |
|
stop a named timer
- Parameters
-
- Returns
- success
The documentation for this class was generated from the following files: