Kaynağa Gözat

Take the shorcut version, which is good enough for
nearly all normal usage.
-Erik

Eric Andersen 24 yıl önce
ebeveyn
işleme
cac4a2ef93
1 değiştirilmiş dosya ile 2 ekleme ve 2 silme
  1. 2 2
      libc/unistd/sleep.c

+ 2 - 2
libc/unistd/sleep.c

@@ -23,14 +23,14 @@
 #include <signal.h>
 #include <signal.h>
 #include <unistd.h>
 #include <unistd.h>
 
 
-#if 0
+#if 1
 /* This is a quick and dirty, but not 100% compliant with
 /* This is a quick and dirty, but not 100% compliant with
  * the stupid SysV SIGCHLD vs. SIG_IGN behaviour.  It is
  * the stupid SysV SIGCHLD vs. SIG_IGN behaviour.  It is
  * fine unless you are messing with SIGCHLD...  */
  * fine unless you are messing with SIGCHLD...  */
 unsigned int sleep (unsigned int sec)
 unsigned int sleep (unsigned int sec)
 {
 {
 	struct timespec ts = { 
 	struct timespec ts = { 
-	    tv_sec:  (long int)(sec / 1000000),
+	    tv_sec:  (long int) sec,
 	    tv_nsec: 0 
 	    tv_nsec: 0 
 	};
 	};
 	nanosleep(&ts, &ts);
 	nanosleep(&ts, &ts);