Speed measurement object.
More...
#include <cvb/utilities/stop_watch.hpp>
Speed measurement object.
- Example:
Speed measurement object.
Definition: stop_watch.hpp:47
std::chrono::milliseconds TimeSpan() const
Gets the time, that has elapsed since start (or since the construction of the object,...
Definition: stop_watch.hpp:150
- Examples
- Minos/QmlMinos.
◆ StopWatch() [1/2]
Create a StopWatch object.
- Parameters
-
[in] | mode | Mode for the stop watch. |
- Exceptions
-
The stop watch is automatically started after creation.
◆ StopWatch() [2/2]
Move constructor.
- Parameters
-
[in] | other | Other stop watch. |
- Exceptions
-
Does | not throw any exception. |
◆ Create()
Create a StopWatch object.
- Parameters
-
[in] | mode | Mode for the stop watch. |
- Returns
- A pointer to the stop watch.
- Exceptions
-
The stop watch is automatically started after creation.
◆ FromHandle()
Creates a stop watch from a classic API handle.
- Parameters
-
[in] | guard | Life time guard for C-API handle. |
[in] | mode | Mode the handle was created with. |
- Returns
- The stop watch created from the classic API handle.
- Exceptions
-
The stop watch takes ownership of the handle, so you must share it before using this function.
◆ Handle()
Classic API stop watch handle.
- Returns
- void* Classic API handle.
- Exceptions
-
Does | not throw any exception. |
It is normally not necessary to work with this handle.
◆ Mode()
Mode for which the stop watch was created.
- Returns
- Mode of the stop watch.
- Exceptions
-
Does | not throw any exception. |
◆ Start()
Start (or re-start) the stopwatch.
- Exceptions
-
This will reset the time span property to 0.0. All subsequent readouts of the time span property will give the time in milliseconds, that has elapsed since the last start or since the construction of the object.
◆ TimeSpan()
Gets the time, that has elapsed since start (or since the construction of the object, if has not been called yet).
- Returns
- Time in milliseconds.
- Exceptions
-