I am writing a class function that returns a duration in microseconds using the chrono library.
std::chrono::duration<std::chrono::miroseconds> stop_watch::get_time() {
auto length = std::chrono::duration_cast<std::chrono::microseconds>(stop_time - start_time);
return length;
}
For some reason my compiler is throwing up at me. All help appreciated thanks!
std::chrono::microseconds
stop_watch::get_time()
{
using namespace std::chrono;
return duration_cast<microseconds>(stop_time - start_time);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With