6#include "../object.hpp"
7#include "../time_span.hpp"
12 namespace diagnostics {
78 int64 elapsed_milliseconds() const noexcept;
85 int64 elapsed_nanoseconds() const noexcept;
95 int64 elapsed_ticks() const noexcept;
100 bool is_running() const noexcept;
114 static
bool is_high_resolution() noexcept;
122 void reset() noexcept;
126 void restart() noexcept;
135 void start() noexcept;
151 void stop() noexcept;
159 static std::chrono::nanoseconds get_timestamp() noexcept;
163 static
int64 get_timestamp_milliseconds() noexcept;
167 static
int64 get_timestamp_nanoseconds() noexcept;
171 static
int64 get_timestamp_ticks() noexcept;
176 bool running_ = false;
Provides a set of methods and properties that you can use to accurately measure elapsed time.
Definition stopwatch.hpp:36
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.hpp:42
#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 namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10
Represents a time interval.
Definition time_span.hpp:29