diff --git a/common/util.c b/common/util.c index 5ea94f481..199f3ee1c 100644 --- a/common/util.c +++ b/common/util.c @@ -10,12 +10,6 @@ #include "log.h" #include "util.h" -uint32_t get_current_time_msec(void) { - struct timespec now; - clock_gettime(CLOCK_MONOTONIC, &now); - return now.tv_sec * 1000 + now.tv_nsec / 1000000; -} - int wrap(int i, int max) { return ((i % max) + max) % max; } diff --git a/include/util.h b/include/util.h index c80da1cbc..f887d4895 100644 --- a/include/util.h +++ b/include/util.h @@ -29,12 +29,6 @@ enum movement_unit parse_movement_unit(const char *unit); int parse_movement_amount(int argc, char **argv, struct movement_amount *amount); -/** - * Get the current time, in milliseconds. - */ - -uint32_t get_current_time_msec(void); - /** * Wrap i into the range [0, max] */ diff --git a/sway/input/cursor.c b/sway/input/cursor.c index cbb5c6e97..c89d5166f 100644 --- a/sway/input/cursor.c +++ b/sway/input/cursor.c @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -31,6 +32,12 @@ #include "sway/tree/workspace.h" #include "wlr-layer-shell-unstable-v1-protocol.h" +static uint32_t get_current_time_msec(void) { + struct timespec now; + clock_gettime(CLOCK_MONOTONIC, &now); + return now.tv_sec * 1000 + now.tv_nsec / 1000000; +} + static struct wlr_surface *layer_surface_at(struct sway_output *output, struct wl_list *layer, double ox, double oy, double *sx, double *sy) { struct sway_layer_surface *sway_layer;