From f19ef562cc996b95f2e75511e59cb786acb99135 Mon Sep 17 00:00:00 2001 From: Pavlo Kushneryk Date: Tue, 30 Apr 2024 21:31:49 +0300 Subject: [PATCH] move CLOCK_REALTIME to CLOCK_MONOTONIC --- internal/timer_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/timer_linux.go b/internal/timer_linux.go index e1e39f9..998dd70 100644 --- a/internal/timer_linux.go +++ b/internal/timer_linux.go @@ -20,7 +20,7 @@ type Timer struct { } func NewTimer(p Poller) (*Timer, error) { - fd, err := unix.TimerfdCreate(unix.CLOCK_REALTIME, unix.TFD_NONBLOCK) + fd, err := unix.TimerfdCreate(unix.CLOCK_MONOTONIC, unix.TFD_NONBLOCK) if err != nil { return nil, os.NewSyscallError("timerfd_create", err) }