summaryrefslogtreecommitdiff
path: root/sys/arch/i386/stand
diff options
context:
space:
mode:
authorMichael Shalayeff <mickey@cvs.openbsd.org>1997-05-31 15:36:42 +0000
committerMichael Shalayeff <mickey@cvs.openbsd.org>1997-05-31 15:36:42 +0000
commitd8a0e635a534bf89ee2cfc5d7ec084da28290dcf (patch)
treebff9be7c42cab9351dbcc04c1bf5a8e10547fe68 /sys/arch/i386/stand
parent21fc99683d8c637a881da58b3be5cd75e3583b39 (diff)
add sleep(3)
Diffstat (limited to 'sys/arch/i386/stand')
-rw-r--r--sys/arch/i386/stand/libsa/time.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/sys/arch/i386/stand/libsa/time.c b/sys/arch/i386/stand/libsa/time.c
index 3f32a70f8cd..701df11296e 100644
--- a/sys/arch/i386/stand/libsa/time.c
+++ b/sys/arch/i386/stand/libsa/time.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: time.c,v 1.2 1997/04/29 00:16:13 mickey Exp $ */
+/* $OpenBSD: time.c,v 1.3 1997/05/31 15:36:41 mickey Exp $ */
/*
* Copyright (c) 1997 Tobias Weingartner
@@ -124,9 +124,10 @@ time_t getsecs(void){
year += bcdtoint(datebuf[1]);
month = bcdtoint(datebuf[2]);
day = bcdtoint(datebuf[3]);
-
- printf("%d/%d/%d - %d:%d:%d\n", day, month, year, hour, min, sec);
-
+#ifdef notdef
+ printf("%d/%d/%d - %d:%d:%d\n",
+ day, month, year, hour, min, sec);
+#endif
tt = compute(year, month, day, hour, min, sec);
return(tt);
}
@@ -171,3 +172,15 @@ void time_print(void){
return;
}
+u_int
+sleep(i)
+ u_int i;
+{
+ register time_t t;
+
+ /* loop for that number of seconds, polling BIOS,
+ so that it may handle interrupts */
+ for (t = getsecs(); (getsecs() - t) < i; ischar());
+
+ return 0;
+}