diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2025-09-04 23:01:12 +0200 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2025-09-04 23:01:12 +0200 |
commit | 02dbc3d9260fa1137e8ebc99ad439fc555d81fd2 (patch) | |
tree | 90e83ed02b1ba7bd919a639c3f90ef072e0bcdcc | |
parent | 029f4bd118eb3f1eca69ed3a7128997f077e0512 (diff) | |
download | nixos-02dbc3d9260fa1137e8ebc99ad439fc555d81fd2.tar nixos-02dbc3d9260fa1137e8ebc99ad439fc555d81fd2.tar.gz nixos-02dbc3d9260fa1137e8ebc99ad439fc555d81fd2.tar.bz2 nixos-02dbc3d9260fa1137e8ebc99ad439fc555d81fd2.tar.xz nixos-02dbc3d9260fa1137e8ebc99ad439fc555d81fd2.zip |
...quickshell
-rw-r--r-- | accounts/gkleen@sif/shell/quickshell-plugins/Chrono.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/accounts/gkleen@sif/shell/quickshell-plugins/Chrono.cpp b/accounts/gkleen@sif/shell/quickshell-plugins/Chrono.cpp index bc765f21..22b3469b 100644 --- a/accounts/gkleen@sif/shell/quickshell-plugins/Chrono.cpp +++ b/accounts/gkleen@sif/shell/quickshell-plugins/Chrono.cpp | |||
@@ -58,6 +58,8 @@ void Chrono::setTime(const std::chrono::time_point<std::chrono::system_clock>& t | |||
58 | } | 58 | } |
59 | 59 | ||
60 | void Chrono::schedule(const std::chrono::time_point<std::chrono::system_clock>& targetTime) { | 60 | void Chrono::schedule(const std::chrono::time_point<std::chrono::system_clock>& targetTime) { |
61 | using namespace std::chrono_literals; | ||
62 | |||
61 | auto currentTime = std::chrono::system_clock::now(); | 63 | auto currentTime = std::chrono::system_clock::now(); |
62 | auto offset = std::chrono::duration_cast<std::chrono::milliseconds>(targetTime - currentTime); | 64 | auto offset = std::chrono::duration_cast<std::chrono::milliseconds>(targetTime - currentTime); |
63 | auto nextTime = abs(offset) < 500ms ? targetTime : currentTime; | 65 | auto nextTime = abs(offset) < 500ms ? targetTime : currentTime; |