aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorLibravatar Kenny Levinsen <kl@kl.wtf>2021-06-20 19:24:55 +0200
committerLibravatar Simon Ser <contact@emersion.fr>2021-06-23 09:55:36 +0200
commit80315217f76e923cb19cdb76aaf9a5d177f11f61 (patch)
tree59a519c26f1803c168bbf8154e72e1c9a95e2fc1 /common
parentUpdate clang format to better match existing code (diff)
downloadsway-80315217f76e923cb19cdb76aaf9a5d177f11f61.tar.gz
sway-80315217f76e923cb19cdb76aaf9a5d177f11f61.tar.zst
sway-80315217f76e923cb19cdb76aaf9a5d177f11f61.zip
input: Move get_current_time_msec in from util
get_current_time_msec is only used in cursor.c, so we can move it in and make it static. This is primarily intended to avoid a symbol collision with wlroots, which we unfortunately do not have a good solution for yet.
Diffstat (limited to 'common')
-rw-r--r--common/util.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/common/util.c b/common/util.c
index 5ea94f48..199f3ee1 100644
--- a/common/util.c
+++ b/common/util.c
@@ -10,12 +10,6 @@
10#include "log.h" 10#include "log.h"
11#include "util.h" 11#include "util.h"
12 12
13uint32_t get_current_time_msec(void) {
14 struct timespec now;
15 clock_gettime(CLOCK_MONOTONIC, &now);
16 return now.tv_sec * 1000 + now.tv_nsec / 1000000;
17}
18
19int wrap(int i, int max) { 13int wrap(int i, int max) {
20 return ((i % max) + max) % max; 14 return ((i % max) + max) % max;
21} 15}