Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: RZ_A2M_Mbed_samples
TickMeter Class Reference
[Utility and system functions and macros]
a Class to measure passing time. More...
#include <utility.hpp>
Public Member Functions | |
CV_WRAP | TickMeter () |
the default constructor | |
CV_WRAP void | start () |
starts counting ticks. | |
CV_WRAP void | stop () |
stops counting ticks. | |
CV_WRAP int64 | getTimeTicks () const |
returns counted ticks. | |
CV_WRAP double | getTimeMicro () const |
returns passed time in microseconds. | |
CV_WRAP double | getTimeMilli () const |
returns passed time in milliseconds. | |
CV_WRAP double | getTimeSec () const |
returns passed time in seconds. | |
CV_WRAP int64 | getCounter () const |
returns internal counter value. | |
CV_WRAP void | reset () |
resets internal values. |
Detailed Description
a Class to measure passing time.
The class computes passing time by counting the number of ticks per second. That is, the following code computes the execution time in seconds:
TickMeter tm; tm.start(); // do something ... tm.stop(); std::cout << tm.getTimeSec();
- See also:
- getTickCount, getTickFrequency
Definition at line 286 of file utility.hpp.
Constructor & Destructor Documentation
CV_WRAP TickMeter | ( | ) |
the default constructor
Definition at line 290 of file utility.hpp.
Member Function Documentation
CV_WRAP int64 getCounter | ( | ) | const |
returns internal counter value.
Definition at line 351 of file utility.hpp.
CV_WRAP double getTimeMicro | ( | ) | const |
returns passed time in microseconds.
Definition at line 327 of file utility.hpp.
CV_WRAP double getTimeMilli | ( | ) | const |
returns passed time in milliseconds.
Definition at line 335 of file utility.hpp.
CV_WRAP double getTimeSec | ( | ) | const |
returns passed time in seconds.
Definition at line 343 of file utility.hpp.
CV_WRAP int64 getTimeTicks | ( | ) | const |
returns counted ticks.
Definition at line 319 of file utility.hpp.
CV_WRAP void reset | ( | ) |
resets internal values.
Definition at line 359 of file utility.hpp.
CV_WRAP void start | ( | ) |
starts counting ticks.
Definition at line 298 of file utility.hpp.
CV_WRAP void stop | ( | ) |
stops counting ticks.
Definition at line 306 of file utility.hpp.
Generated on Tue Jul 12 2022 18:20:23 by
