mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2026-02-17 22:05:25 -05:00
opt: change unsigned int to uint32_t
This commit is contained in:
parent
9196e2a50b
commit
b9952f03b5
20 changed files with 314 additions and 329 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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,5 +6,5 @@ void *ecalloc(size_t nmemb, size_t size);
|
|||
int fd_set_nonblock(int fd);
|
||||
int regex_match(const char *pattern_mb, const char *str_mb);
|
||||
void wl_list_append(struct wl_list *list, struct wl_list *object);
|
||||
unsigned int get_now_in_ms(void);
|
||||
unsigned int timespec_to_ms(struct timespec *ts);
|
||||
uint32_t get_now_in_ms(void);
|
||||
uint32_t timespec_to_ms(struct timespec *ts);
|
||||
Loading…
Add table
Add a link
Reference in a new issue