From dca65fdfe64532dce144360615874e8701a5644d Mon Sep 17 00:00:00 2001 From: Furkan Sahin Date: Mon, 16 Jun 2025 00:41:19 +0900 Subject: Rename get_current_time_msec to get_current_time_in_msec and move to util.c get_current_time_msec conflicts with a function with the same name in wlroots. --- common/util.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'common') diff --git a/common/util.c b/common/util.c index 7c492bcb..ae1fe443 100644 --- a/common/util.c +++ b/common/util.c @@ -141,3 +141,9 @@ bool sway_set_cloexec(int fd, bool cloexec) { } return true; } + +uint32_t get_current_time_in_msec(void) { + struct timespec now; + clock_gettime(CLOCK_MONOTONIC, &now); + return now.tv_sec * 1000 + now.tv_nsec / 1000000; +} -- cgit v1.2.3