summaryrefslogtreecommitdiff
path: root/libc/syscall/syslibc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/syscall/syslibc.c')
-rw-r--r--libc/syscall/syslibc.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/libc/syscall/syslibc.c b/libc/syscall/syslibc.c
index 1dcb013..e6d58eb 100644
--- a/libc/syscall/syslibc.c
+++ b/libc/syscall/syslibc.c
@@ -6,6 +6,7 @@
#include <sys/types.h>
#include <errno.h>
#include <time.h>
+#include <sys/times.h>
/* MSDOS has it's own versions */
#ifndef __MSDOS__
@@ -117,6 +118,18 @@ time_t *where;
}
#endif
+/********************** Function times ************************************/
+
+#ifdef L_times
+clock_t times(buf)
+struct tms* buf;
+{
+ long rv;
+ __times(buf, &rv);
+ return rv;
+}
+#endif
+
/********************** Function lseek ************************************/
#ifdef L_lseek
@@ -359,6 +372,22 @@ unsigned int seconds;
return seconds - (time((void*)0) - start);
}
#endif
+
+#endif
+
+/********************** Function usleep ************************************/
+
+#ifdef L_usleep
+#include <sys/time.h>
+void
+usleep(useconds)
+unsigned long useconds;
+{
+ struct timeval timeout;
+ timeout.tv_sec = useconds%1000000L;
+ timeout.tv_usec = useconds/1000000L;
+ select(1, NULL, NULL, NULL, &timeout);
+}
#endif
/********************** THE END ********************************************/