summaryrefslogtreecommitdiff
path: root/StdLib
diff options
context:
space:
mode:
Diffstat (limited to 'StdLib')
-rw-r--r--StdLib/Include/unistd.h4
-rw-r--r--StdLib/LibC/Uefi/select.c27
2 files changed, 16 insertions, 15 deletions
diff --git a/StdLib/Include/unistd.h b/StdLib/Include/unistd.h
index df78690525..2134f15765 100644
--- a/StdLib/Include/unistd.h
+++ b/StdLib/Include/unistd.h
@@ -37,6 +37,8 @@ extern int optind;
pid_t getpgrp(void);
pid_t tcgetpgrp(int);
char *getpass(const char *);
+int usleep(useconds_t);
+unsigned int sleep(unsigned int);
// Networking
long gethostid(void);
@@ -84,7 +86,6 @@ int setgid(gid_t);
int setpgid(pid_t, pid_t);
pid_t setsid(void);
int setuid(uid_t);
-unsigned int sleep(unsigned int);
long sysconf(int);
int tcsetpgrp(int, pid_t);
@@ -127,7 +128,6 @@ void swab(const void *, void *, size_t);
int symlink(const char *, const char *);
void sync(void);
useconds_t ualarm(useconds_t, useconds_t);
-int usleep(useconds_t);
pid_t vfork(void) __RENAME(__vfork14);
/*
diff --git a/StdLib/LibC/Uefi/select.c b/StdLib/LibC/Uefi/select.c
index 8da03e65d0..830e011e0d 100644
--- a/StdLib/LibC/Uefi/select.c
+++ b/StdLib/LibC/Uefi/select.c
@@ -74,19 +74,14 @@
#define MAX_SLEEP_DELAY 0xfffffffe
-//
-// Name:
-// usleep
-//
-// Description:
-// Implement usleep(3) function.
-//
-// Arguments:
-// Microseconds to sleep.
-//
-// Returns:
-// 0
-//
+/** Sleep for the specified number of Microseconds.
+
+ Implements the usleep(3) function.
+
+ @param[in] Microseconds Number of microseconds to sleep.
+
+ @retval 0 Always returns zero.
+**/
int
usleep( useconds_t Microseconds )
{
@@ -98,6 +93,12 @@ usleep( useconds_t Microseconds )
return (0);
}
+unsigned int
+sleep( unsigned int Seconds )
+{
+ return (usleep( useconds_t(Seconds * 1000000) ));
+}
+
static int
selscan(
fd_mask **ibits,