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.
This commit is contained in:
hwsmm 2025-06-16 00:41:19 +09:00 committed by Kenny Levinsen
parent 17f7c1b782
commit 4b15b3427f
3 changed files with 10 additions and 8 deletions

View file

@ -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;
}