glibmm 2.80.0
|
Portable stop watch interface. More...
#include <glibmm/timer.h>
Public Member Functions | |
Timer () | |
Create a new timer. | |
~Timer () noexcept | |
Timer (const Timer &)=delete | |
Timer & | operator= (const Timer &)=delete |
void | start () |
void | stop () |
void | reset () |
void | resume () |
Resumes a timer that has previously been stopped with stop(). | |
double | elapsed () const |
Get the elapsed time. | |
double | elapsed (unsigned long µseconds) const |
Get the elapsed time. | |
bool | is_active () const |
Exposes whether the timer is currently active. | |
Portable stop watch interface.
This resembles a convenient and portable timer with microseconds resolution.
Glib::Timer::Timer | ( | ) |
Create a new timer.
Also starts timing by calling start() implicitly.
|
noexcept |
double Glib::Timer::elapsed | ( | ) | const |
Get the elapsed time.
Get the elapsed time.
microseconds
with the corresponding µs value. bool Glib::Timer::is_active | ( | ) | const |
Exposes whether the timer is currently active.
@newin{2,70]
true
if the timer is running, false
otherwise. void Glib::Timer::reset | ( | ) |
void Glib::Timer::resume | ( | ) |
void Glib::Timer::start | ( | ) |
void Glib::Timer::stop | ( | ) |