159 [[nodiscard]] static auto
get_timestamp() noexcept -> std::chrono::nanoseconds;
176 bool running_ = false;
Provides a set of methods and properties that you can use to accurately measure elapsed time.
Definition stopwatch.hpp:36
static auto get_timestamp() noexcept -> std::chrono::nanoseconds
Gets the current number of nanoseconds in the timer mechanism.
auto reset() noexcept -> void
Stops time interval measurement and resets the elapsed time to zero.
auto is_running() const noexcept -> bool
Gets a value indicating whether the stopwatch timer is running.
auto start() noexcept -> void
Starts, or resumes, measuring elapsed time for an interval.
auto elapsed_ticks() const noexcept -> xtd::int64
Gets the total elapsed time measured by the current instance, in timer ticks.
static auto get_timestamp_milliseconds() noexcept -> xtd::int64
Gets the current number of nanoseconds in the timer mechanism, in milliseconds.
stopwatch()=default
Initializes a new instance of the xtd::diagnostics::stopwatch class.
auto elapsed() const noexcept -> xtd::time_span
Gets the total elapsed time measured by the current instance.
auto stop() noexcept -> void
Stops measuring elapsed time for an interval.
static auto get_timestamp_nanoseconds() noexcept -> xtd::int64
Gets the current number of nanoseconds in the timer mechanism, in nanoseconds.
auto elapsed_milliseconds() const noexcept -> xtd::int64
Gets the total elapsed time measured by the current instance, in milliseconds.
static auto is_high_resolution() noexcept -> bool
Indicates whether the timer is based on a high-resolution performance counter. This field is read-onl...
auto elapsed_nanoseconds() const noexcept -> xtd::int64
Gets the total elapsed time measured by the current instance, in nanoseconds.
static auto frequency() noexcept -> xtd::int64
Gets the frequency of the timer as the number of nanoseconds per second. This field is read-only.
static auto get_timestamp_ticks() noexcept -> xtd::int64
Gets the current number of nanoseconds in the timer mechanism, in ticks.
auto restart() noexcept -> void
stops time interval measurement, resets the elapsed time to zero, and starts measuring elapsed time.
static auto start_new() noexcept -> xtd::diagnostics::stopwatch
Initializes a new xtd::diagnostics::stopwatch instance, sets the xtd::diagnostics::stopwatch::elapsed...
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:45
Represents a time interval.
Definition time_span.hpp:29
#define core_export_
Define shared library export.
Definition core_export.hpp:13
std::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.