From 877fb5b93ada9b25b4d2f5ca5f69370fa345f1ac Mon Sep 17 00:00:00 2001 From: Vaxry Date: Wed, 16 Apr 2025 01:37:48 +0100 Subject: time: move to stl's clocks and move timer --- src/xwayland/XSurface.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/xwayland/XSurface.cpp') 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]; -- cgit v1.2.3