11#include "../_cexports/c_utilities.h"
13#include "../global.hpp"
15#include "utilities.hpp"
16#include "system_info.hpp"
24 inline HandleGuard<Utilities::StopWatch>::HandleGuard(
void *handle) noexcept
25 : HandleGuard<Utilities::StopWatch>(handle, [](
void *handle) { CVB_CALL_CAPI(
TWDestroy(handle)); })
56 auto stopWatch = Internal::DoBoolCallObjectOut<StopWatch>(
65 return CVB_CALL_CAPI(
TWCreate(&handle));
100 return handle_.Handle();
131 SystemInfo::ThrowLastError();
144 SystemInfo::ThrowLastError();
165 HandleGuard<StopWatch> handle_;
StopWatch(StopWatchMode mode=StopWatchMode::MultiCPU)
Create a StopWatch object.
Definition stop_watch.hpp:80
Speed measurement object.
Definition stop_watch.hpp:43
void Start()
Start (or re-start) the stopwatch.
Definition stop_watch.hpp:128
std::chrono::milliseconds TimeSpan() const
Gets the time, that has elapsed since start (or since the construction of the object,...
Definition stop_watch.hpp:140
static std::unique_ptr< StopWatch > FromHandle(HandleGuard< StopWatch > &&guard, StopWatchMode mode)
Creates a stop watch from a classic API handle.
Definition stop_watch.hpp:112
StopWatch(StopWatchMode mode=StopWatchMode::MultiCPU)
Create a StopWatch object.
Definition stop_watch.hpp:80
static std::unique_ptr< StopWatch > Create(StopWatchMode mode=StopWatchMode::MultiCPU)
Create a StopWatch object.
Definition stop_watch.hpp:54
void * Handle() const noexcept
Classic API stop watch handle.
Definition stop_watch.hpp:98
StopWatchMode Mode() const noexcept
Mode for which the stop watch was created.
Definition stop_watch.hpp:153
Namespace for helpers and utilities, which are not directly related to image processing.
Definition version.hpp:16
StopWatchMode
Mode at which the StopWatch should work.
Definition utilities.hpp:28
@ SingleCPU
Definition utilities.hpp:42
@ MultiCPU
Definition utilities.hpp:34
Root namespace for the Image Manager interface.
Definition c_bayer_to_rgb.h:17