control a set of named stop watch like timers More...
#include <stopwatch.hh>
Classes | |
| struct | timer_t |
Public Member Functions | |
| StopWatch (bool print_on_exit=false) | |
| Constructor. | |
| ~StopWatch () | |
| Destructor. | |
| void | set_print_on_exit (bool print_on_exit) |
| bool | start (const std::string &name) |
| start a named timer | |
| bool | stop (const std::string &name) |
| stop a named timer | |
| bool | is_running (const std::string &name) const |
| test whether named timer is running | |
| double | current_total (const std::string &name) const |
| current total time of a named timer | |
| size_t | current_cycles (const std::string &name) const |
| current start/stop cycles of a named timer | |
| std::ostream & | print_info (std::ostream &out, const std::string &name) const |
| print information for one timer | |
| std::ostream & | print_info (std::ostream &out) const |
| print information for all timers | |
control a set of named stop watch like timers
| LocARNA::StopWatch::StopWatch | ( | bool | print_on_exit = false | ) | [explicit] |
Constructor.
| print_on_exit | whether to automatically print times on exit |
| size_t LocARNA::StopWatch::current_cycles | ( | const std::string & | name | ) | const |
current start/stop cycles of a named timer
| name | timer name |
| double LocARNA::StopWatch::current_total | ( | const std::string & | name | ) | const |
current total time of a named timer
| name | timer name |
| bool LocARNA::StopWatch::is_running | ( | const std::string & | name | ) | const |
test whether named timer is running
| name | timer name |
| std::ostream & LocARNA::StopWatch::print_info | ( | std::ostream & | out, |
| const std::string & | name | ||
| ) | const |
print information for one timer
| out | output stream |
| name |
| std::ostream & LocARNA::StopWatch::print_info | ( | std::ostream & | out | ) | const |
print information for all timers
| out | output stream |
| void LocARNA::StopWatch::set_print_on_exit | ( | bool | print_on_exit | ) |
Control automatic printing of times at exit
| print_on_exit | whether to print on exit |
| bool LocARNA::StopWatch::start | ( | const std::string & | name | ) |
start a named timer
| name | timer name |
| bool LocARNA::StopWatch::stop | ( | const std::string & | name | ) |
stop a named timer
| name | timer name |
1.7.6.1