[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] Using std::chrono::high_resolution_clock for Timer implementat
From: |
Greg Chicares |
Subject: |
Re: [lmi] Using std::chrono::high_resolution_clock for Timer implementation |
Date: |
Fri, 4 Jun 2021 14:34:46 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.9.0 |
On 6/4/21 12:43 PM, Vadim Zeitlin wrote:
[...big snip...]
> So, to summarize, I'll confirm that we can rely on getting sufficient
> precision from high_resolution_clock on all platforms we're interested in
> and, if this is indeed the case, will just do the minimal changes to Timer
> class implementation for now
Excellent.
> (and by "now" I mean "after finishing with
> Boost.Regex replacement experimentation"),
Okay. [I'm indifferent to the sequencing of those two steps--whether
high-res-timer precedes or follows regex-experiments doesn't matter
to me: swap them freely if you choose.]
> that won't affect its public
> interface.
I think we agree on a detail that may be implicit, but let me state
it explicitly: I would strongly prefer that std::chrono::* be
physically sequestered as much as possible, ideally by modifying
only 'timer.cpp'. I'd rather not #include <chrono> in 'timer.hpp',
which is included in many other lmi source files.
> Once this is done, we could discuss making the class fully
> inline and, maybe, even some potential enhancements of its API.
Yes, I concur.