Initializes a xtd::diagnostics::stopwatch instance by using a simple class constructor.
#include <xtd/diagnostics/stopwatch>
#include <xtd/threading/thread>
#include <xtd/console>
#include <chrono>
using namespace std::chrono;
auto main() -> int {
stopwatch.stop();
auto ts = stopwatch.elapsed();
auto elapsed_time = string::format("{0:H}:{0:M}:{0:S}.{1:D2}", ts, ts.milliseconds() / 10);
}
static void write_line()
Writes the current line terminator to the standard output stream using the specified format informati...
Provides a set of methods and properties that you can use to accurately measure elapsed time.
Definition stopwatch.hpp:36
void start() noexcept
Starts, or resumes, measuring elapsed time for an interval.
static void sleep(int32 milliseconds_timeout)
Suspends the current thread for a specified time.
The xtd::threading namespace provides classes and interfaces that enable multithreaded programming....
Definition abandoned_mutex_exception.hpp:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8