summaryrefslogtreecommitdiff
path: root/src/xwayland
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2025-04-16 01:37:48 +0100
committerVaxry <vaxry@vaxry.net>2025-04-16 01:37:48 +0100
commit877fb5b93ada9b25b4d2f5ca5f69370fa345f1ac (patch)
tree5b52ad19c695590ae50c7adae06b8e3aeccf34c1 /src/xwayland
parent0e521788bcc414c9cf81648d3167757d83deb60f (diff)
time: move to stl's clocks and move timer
Diffstat (limited to 'src/xwayland')
-rw-r--r--src/xwayland/XSurface.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/xwayland/XSurface.cpp b/src/xwayland/XSurface.cpp
index 30e38ac2..1ef1c673 100644
--- a/src/xwayland/XSurface.cpp
+++ b/src/xwayland/XSurface.cpp
@@ -3,6 +3,7 @@
#include "../protocols/XWaylandShell.hpp"
#include "../protocols/core/Compositor.hpp"
#include "../managers/ANRManager.hpp"
+#include "../helpers/time/Time.hpp"
#ifndef NO_XWAYLAND
@@ -253,12 +254,9 @@ void CXWaylandSurface::ping() {
return;
}
- timespec now;
- clock_gettime(CLOCK_MONOTONIC, &now);
-
xcb_client_message_data_t msg = {};
msg.data32[0] = HYPRATOMS["_NET_WM_PING"];
- msg.data32[1] = now.tv_sec * 1000 + now.tv_nsec / 1000000;
+ msg.data32[1] = Time::millis(Time::steadyNow());
msg.data32[2] = xID;
lastPingSeq = msg.data32[1];