mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-03-01 01:40:19 -05:00
opt: change unsigned int to uint32_t
This commit is contained in:
parent
ca3ff578fa
commit
9bf87a9610
20 changed files with 313 additions and 328 deletions
|
|
@ -82,14 +82,13 @@ void wl_list_append(struct wl_list *list, struct wl_list *object) {
|
|||
wl_list_insert(list->prev, object);
|
||||
}
|
||||
|
||||
unsigned int get_now_in_ms(void) {
|
||||
uint32_t get_now_in_ms(void) {
|
||||
struct timespec now;
|
||||
clock_gettime(CLOCK_MONOTONIC, &now);
|
||||
|
||||
return timespec_to_ms(&now);
|
||||
}
|
||||
|
||||
unsigned int timespec_to_ms(struct timespec *ts) {
|
||||
return (unsigned int)ts->tv_sec * 1000 +
|
||||
(unsigned int)ts->tv_nsec / 1000000;
|
||||
uint32_t timespec_to_ms(struct timespec *ts) {
|
||||
return (uint32_t)ts->tv_sec * 1000 + (uint32_t)ts->tv_nsec / 1000000;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue