176 bool running_ = false;
static std::chrono::nanoseconds get_timestamp() noexcept
Gets the current number of nanoseconds in the timer mechanism.
void stop() noexcept
Stops measuring elapsed time for an interval.
void reset() noexcept
Stops time interval measurement and resets the elapsed time to zero.
int64 elapsed_ticks() const noexcept
Gets the total elapsed time measured by the current instance, in timer ticks.
time_span elapsed() const noexcept
Gets the total elapsed time measured by the current instance.
static int64 frequency() noexcept
Gets the frequency of the timer as the number of nanoseconds per second. This field is read-only.
static int64 get_timestamp_nanoseconds() noexcept
Gets the current number of nanoseconds in the timer mechanism, in nanoseconds.
void start() noexcept
Starts, or resumes, measuring elapsed time for an interval.
static int64 get_timestamp_milliseconds() noexcept
Gets the current number of nanoseconds in the timer mechanism, in milliseconds.
static int64 get_timestamp_ticks() noexcept
Gets the current number of nanoseconds in the timer mechanism, in ticks.
stopwatch()=default
Initializes a new instance of the xtd::diagnostics::stopwatch class.
int64 elapsed_milliseconds() const noexcept
Gets the total elapsed time measured by the current instance, in milliseconds.
static stopwatch start_new() noexcept
Initializes a new xtd::diagnostics::stopwatch instance, sets the xtd::diagnostics::stopwatch::elapsed...
bool is_running() const noexcept
Gets a value indicating whether the stopwatch timer is running.
int64 elapsed_nanoseconds() const noexcept
Gets the total elapsed time measured by the current instance, in nanoseconds.
static bool is_high_resolution() noexcept
Indicates whether the timer is based on a high-resolution performance counter. This field is read-onl...
void restart() noexcept
stops time interval measurement, resets the elapsed time to zero, and starts measuring elapsed time.
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:44
Represents a time interval.
Definition time_span.hpp:29
#define core_export_
Define shared library export.
Definition core_export.hpp:13
int64_t int64
Represents a 64-bit signed integer.
Definition int64.hpp:23
The xtd::diagnostics namespace provides classes that allow you to interact with system processes,...
Definition assert_dialog_result.hpp:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
Contains xtd::object class.
Contains xtd::time_span class.