wlroots-hyprland/include/util/time.h
Tudor Brindus dc13bb827d util: fix and move get_current_time_msec into a util file
This commit makes `get_current_time_msec` correctly return milliseconds
as opposed to microseconds. It also considers the value of `tv_sec`, so
we don't lose occasionally go back in time by one second. Finally, the
function is moved into `util/time.cc` so that it can be reused elsewhere
without having to consider these pitfalls.
2020-06-06 00:09:19 +02:00

9 lines
137 B
C

#ifndef UTIL_TIME_H
#define UTIL_TIME_H
/**
* Get the current time, in milliseconds.
*/
uint32_t get_current_time_msec(void);
#endif