7#include "../time_span.h"
12 namespace diagnostics {
76 int64 elapsed_milliseconds() const noexcept;
83 int64 elapsed_nanoseconds() const noexcept;
93 int64 elapsed_ticks() const noexcept;
98 bool is_running() const noexcept;
112 static
bool is_high_resolution() noexcept;
120 void reset() noexcept;
124 void restart() noexcept;
133 void start() noexcept;
149 void stop() noexcept;
157 static std::chrono::nanoseconds get_timestamp() noexcept;
161 static
int64 get_timestamp_milliseconds() noexcept;
165 static
int64 get_timestamp_nanoseconds() noexcept;
169 static
int64 get_timestamp_ticks() noexcept;
174 bool running_ = false;
Provides a set of methods and properties that you can use to accurately measure elapsed time.
Definition stopwatch.h:34
time_span elapsed() const noexcept
Gets the total elapsed time measured by the current instance.
stopwatch()=default
Initializes a new instance of the xtd::diagnostics::stopwatch class.
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.h:32
#define core_export_
Define shared library export.
Definition core_export.h:13
int_least64_t int64
Represents a 64-bit signed integer.
Definition types.h:142
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10
Represents a time interval.
Definition time_span.h:26