mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-16 20:43:48 -07:00
core: move to steady_clock where applicable
avoid issues when system clock gets desynchronized or changed
This commit is contained in:
@@ -155,7 +155,7 @@ class CBaseAnimatedVariable {
|
||||
bool m_bIsRegistered = false;
|
||||
bool m_bIsBeingAnimated = false;
|
||||
|
||||
std::chrono::system_clock::time_point animationBegin;
|
||||
std::chrono::steady_clock::time_point animationBegin;
|
||||
|
||||
AVARDAMAGEPOLICY m_eDamagePolicy = AVARDAMAGE_NONE;
|
||||
ANIMATEDVARTYPE m_Type;
|
||||
@@ -253,7 +253,7 @@ class CAnimatedVariable : public CBaseAnimatedVariable {
|
||||
return *this;
|
||||
|
||||
m_Goal = v;
|
||||
animationBegin = std::chrono::system_clock::now();
|
||||
animationBegin = std::chrono::steady_clock::now();
|
||||
m_Begun = m_Value;
|
||||
|
||||
onAnimationBegin();
|
||||
@@ -267,7 +267,7 @@ class CAnimatedVariable : public CBaseAnimatedVariable {
|
||||
return;
|
||||
|
||||
m_Value = v;
|
||||
animationBegin = std::chrono::system_clock::now();
|
||||
animationBegin = std::chrono::steady_clock::now();
|
||||
m_Begun = m_Value;
|
||||
|
||||
onAnimationBegin();
|
||||
|
Reference in New Issue
Block a user