summaryrefslogtreecommitdiff
path: root/src/port/pgsleep.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/port/pgsleep.c')
-rw-r--r--src/port/pgsleep.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/port/pgsleep.c b/src/port/pgsleep.c
index 41f989dbbe..b4a6596540 100644
--- a/src/port/pgsleep.c
+++ b/src/port/pgsleep.c
@@ -6,7 +6,7 @@
*
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
*
- * $PostgreSQL: pgsql/src/port/pgsleep.c,v 1.2 2004/02/10 04:23:03 tgl Exp $
+ * $PostgreSQL: pgsql/src/port/pgsleep.c,v 1.3 2004/04/12 16:19:18 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -15,7 +15,6 @@
#include <unistd.h>
#include <sys/time.h>
-
/*
* pg_usleep --- delay the specified number of microseconds.
*
@@ -25,6 +24,9 @@
*
* On machines where "long" is 32 bits, the maximum delay is ~2000 seconds.
*/
+#ifdef pg_usleep
+#undef pg_usleep
+#endif
void
pg_usleep(long microsec)
{
@@ -37,7 +39,7 @@ pg_usleep(long microsec)
delay.tv_usec = microsec % 1000000L;
(void) select(0, NULL, NULL, NULL, &delay);
#else
- SleepEx((microsec < 500 ? 1 : (microsec + 500) / 1000), TRUE);
+ SleepEx((microsec < 500 ? 1 : (microsec + 500) / 1000), FALSE);
#endif
}
}