diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2025-06-16 00:41:19 +0900 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2025-06-16 00:41:19 +0900 |
| commit | dca65fdfe64532dce144360615874e8701a5644d (patch) | |
| tree | eb1ba6fc19fc687f097957ab9039e5f4d37d8cd3 /common | |
| parent | 0efa93247c9807d30908a76ec797ae2d4d148556 (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; +} |
