C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Obtaining the low-level clock used by std::chrono::steady_clock

From: Bjorn Reese <breese_at_[hidden]>
Date: Thu, 20 Apr 2023 17:04:23 +0200
On 4/20/23 02:20, Thiago Macieira via Std-Proposals wrote:
> In refactoring some older Qt code that directly used clock_gettime() to use
> std::chrono::steady_clock, I stumbled upon a limitation: I need to pass clock
> time points to certain low-level functions. The one in particular I was
[...]
> Therefore, I'd like to propose that steady_clock add an extra method that
> returns the clock ID. It could be as simple as:

What is the motivation for adding this to the standard, rather than just
creating your own clock with the lower-level interoperability?

Received on 2023-04-20 15:04:27