Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Take care of system clock change #947

Open
kenmasumitsu opened this issue Dec 19, 2018 · 1 comment
Open

Take care of system clock change #947

kenmasumitsu opened this issue Dec 19, 2018 · 1 comment

Comments

@kenmasumitsu
Copy link

spdlog uses std::condition_variable. However std::condition_variable does not use monotonic timer.
It means that when system clock is changed, it does not work expectedly.

One solution is using pthread with pthread_condattr_setclock(&m_attr, CLOCK_MONOTONIC); instead of std::thread.
https://stackoverflow.com/questions/51005267/how-do-i-deal-with-the-system-clock-changing-while-waiting-on-a-stdcondition-v

@gabime gabime added the wontfix label Mar 3, 2019
@gabime
Copy link
Owner

gabime commented Mar 3, 2019

This is a well known issue in the libstd++/glibc implementation of std::condition_variable.

I don't think spdlog should try to fix such fundamental thing by its own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants