Roger Leigh
2018-11-02 10:19:50 UTC
Hi folks,
Is there any recommended way to convert a QDateTime to a
std::chrono::timepoint? I'd like to take the value of
QFileInfo::lastModified() and pass it to an interface using e.g.
std::chrono<high_resolution_clock, milliseconds> (or nanoseconds).
However, making this work portably, including all the epoch and leap
second issues, looks complicated and error-prone. Has anyone got any
suggestions for how best to do this?
Thanks,
Roger
Is there any recommended way to convert a QDateTime to a
std::chrono::timepoint? I'd like to take the value of
QFileInfo::lastModified() and pass it to an interface using e.g.
std::chrono<high_resolution_clock, milliseconds> (or nanoseconds).
However, making this work portably, including all the epoch and leap
second issues, looks complicated and error-prone. Has anyone got any
suggestions for how best to do this?
Thanks,
Roger