Skip to content

Conversation

@Lomadriel
Copy link
Member

@Lomadriel Lomadriel commented Apr 3, 2019

Fixes #857.

Add a re-implementation of std::condition_variable that uses the monotonic clock of POSIX.
Also replaces the call to system_clock::now() by steady_clock::now().

EDIT:

Fixes #1932

@Lomadriel Lomadriel changed the title Replacing condition_variable from STL by a monotonic implementation. Replace condition_variable from STL by a monotonic implementation. Apr 3, 2019
@Lomadriel
Copy link
Member Author

A little update concerning this PR, this bug has been fixed in GCC10 if I'm not wrong.

@patrick96
Copy link
Member

I assume you are refering to this bug. So that would mean we could scrap the use of our custom condition_variable but keep using steady_clock.

It's probably going to be a long time until gcc 10 is installed on most users computers but I'm not sure if maintaining our own version of condition_variable is appropriate, since the issue is easily fixed by restarting polybar in place.

Also I'm wondering whether or not clang is affected, I would assume not

@Lomadriel
Copy link
Member Author

I assume you are refering to this bug. So that would mean we could scrap the use of our custom condition_variable but keep using steady_clock.

Yes it's this bug.

It's probably going to be a long time until gcc 10 is installed on most users computers but I'm not sure if maintaining our own version of condition_variable is appropriate, since the issue is easily fixed by restarting polybar in place.

Indeed that might be overkill for DST but I remember that someone had a problem with a clock that wasn't working properly but I can't find that issue anymore.

@patrick96
Copy link
Member

You mean #857?

patrick96 pushed a commit that referenced this pull request Jan 12, 2022
This fixes #857 and #1932. Also replaces PR #1725, since we don't need
our own implementation of condition_variable anymore since people who
update their polybar should have GCC 10 by now.

The m_updated_at field of the mpd module was removed instead of having
its clock change because it became unused in commit 645a314.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

incorrect time after unhibernating Modules stop updating when system clock moves backwards

3 participants