]> ncurses.scripts.mit.edu Git - ncurses.git/blobdiff - ncurses/tinfo/lib_napms.c
ncurses 5.0
[ncurses.git] / ncurses / tinfo / lib_napms.c
similarity index 95%
rename from ncurses/lib_napms.c
rename to ncurses/tinfo/lib_napms.c
index eec7b0a214796a9b747a7dca0d79fab5ae6af9a4..a85304bf1cb687a455c2286c6e19d101a26340ac 100644 (file)
@@ -41,7 +41,9 @@
 
 #include <curses.priv.h>
 
 
 #include <curses.priv.h>
 
-#if USE_FUNC_POLL
+#if HAVE_NANOSLEEP
+#include <time.h>
+#elif USE_FUNC_POLL
 #include <stropts.h>
 #include <poll.h>
 #if HAVE_SYS_TIME_H
 #include <stropts.h>
 #include <poll.h>
 #if HAVE_SYS_TIME_H
@@ -54,9 +56,9 @@
 #if HAVE_SYS_SELECT_H
 #include <sys/select.h>
 #endif
 #if HAVE_SYS_SELECT_H
 #include <sys/select.h>
 #endif
-#endif  
+#endif
 
 
-MODULE_ID("$Id: lib_napms.c,v 1.4 1998/02/13 10:24:54 jbuhler Exp $")
+MODULE_ID("$Id: lib_napms.c,v 1.6 1999/10/21 23:01:41 tom Exp $")
 
 int napms(int ms)
 {
 
 int napms(int ms)
 {
@@ -69,8 +71,6 @@ int napms(int ms)
                ts.tv_nsec = (ms % 1000) * 1000000;
                nanosleep(&ts, NULL);
        }
                ts.tv_nsec = (ms % 1000) * 1000000;
                nanosleep(&ts, NULL);
        }
-#elif HAVE_USLEEP
-       usleep(1000*(unsigned)ms);
 #elif USE_FUNC_POLL
        {
                struct pollfd fds[1];
 #elif USE_FUNC_POLL
        {
                struct pollfd fds[1];