mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-04-02 05:48:44 +00:00
Fix usleep() definition
This commit is contained in:
parent
20c794a353
commit
4cf987ddb1
2 changed files with 3 additions and 2 deletions
|
@ -168,7 +168,7 @@ int truncate(const char *, int64_t);
|
|||
int ttyname_r(int, char *, size_t);
|
||||
int unlink(const char *);
|
||||
int unlinkat(int, const char *, int);
|
||||
int usleep(unsigned);
|
||||
int usleep(uint64_t);
|
||||
int vfork(void) returnstwice;
|
||||
int wait(int *);
|
||||
int waitpid(int, int *, int);
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include "libc/calls/struct/timespec.h"
|
||||
#include "libc/errno.h"
|
||||
#include "libc/sysv/consts/clock.h"
|
||||
#include "libc/sysv/consts/utime.h"
|
||||
#include "libc/sysv/errfuns.h"
|
||||
#include "libc/time/time.h"
|
||||
|
||||
|
@ -32,7 +33,7 @@
|
|||
* @cancelationpoint
|
||||
* @norestart
|
||||
*/
|
||||
int usleep(uint32_t micros) {
|
||||
int usleep(uint64_t micros) {
|
||||
errno_t err;
|
||||
struct timespec ts = timespec_frommicros(micros);
|
||||
err = clock_nanosleep(CLOCK_REALTIME, 0, &ts, 0);
|
||||
|
|
Loading…
Add table
Reference in a new issue