diff options
| author | hwsmm <9151706+hwsmm@users.noreply.github.com> | 2025-06-16 00:41:19 +0900 |
|---|---|---|
| committer | Kenny Levinsen <kl@kl.wtf> | 2025-06-16 11:26:26 +0200 |
| commit | 4b15b3427fd0835247d0a2e188c00f1d2aa04484 (patch) | |
| tree | eb1ba6fc19fc687f097957ab9039e5f4d37d8cd3 /common | |
| parent | 17f7c1b7820e4f85913ec70ab3c76f238c15c54c (diff) | |
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.
Diffstat (limited to 'common')
| -rw-r--r-- | common/util.c | 6 |
1 files changed, 6 insertions, 0 deletions
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; +} |
