summaryrefslogtreecommitdiff
path: root/accounts/gkleen@sif
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2025-09-04 23:01:12 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2025-09-04 23:01:12 +0200
commit02dbc3d9260fa1137e8ebc99ad439fc555d81fd2 (patch)
tree90e83ed02b1ba7bd919a639c3f90ef072e0bcdcc /accounts/gkleen@sif
parent029f4bd118eb3f1eca69ed3a7128997f077e0512 (diff)
downloadnixos-02dbc3d9260fa1137e8ebc99ad439fc555d81fd2.tar
nixos-02dbc3d9260fa1137e8ebc99ad439fc555d81fd2.tar.gz
nixos-02dbc3d9260fa1137e8ebc99ad439fc555d81fd2.tar.bz2
nixos-02dbc3d9260fa1137e8ebc99ad439fc555d81fd2.tar.xz
nixos-02dbc3d9260fa1137e8ebc99ad439fc555d81fd2.zip
...
Diffstat (limited to 'accounts/gkleen@sif')
-rw-r--r--accounts/gkleen@sif/shell/quickshell-plugins/Chrono.cpp2
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
60void Chrono::schedule(const std::chrono::time_point<std::chrono::system_clock>& targetTime) { 60void 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;