mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2026-05-05 01:58:01 +02:00
util: add msleep()
This commit is contained in:
parent
1748ddaf3d
commit
f300a4919a
1 changed files with 8 additions and 1 deletions
|
|
@ -29,8 +29,9 @@
|
|||
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <time.h>
|
||||
#include <stdint.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
|
||||
/* Merely for code readability, e.g. timeout = us(100); */
|
||||
static inline uint64_t
|
||||
|
|
@ -77,3 +78,9 @@ now(uint64_t *now_out)
|
|||
return -errno;
|
||||
}
|
||||
}
|
||||
|
||||
static inline void
|
||||
msleep(int32_t millis)
|
||||
{
|
||||
usleep(ms2us(millis));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue