File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change 11
11
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
12
12
*
13
13
* IDENTIFICATION
14
- * $PostgreSQL: pgsql/src/backend/port/win32/timer.c,v 1.10 2006/08/09 17:47:03 momjian Exp $
14
+ * $PostgreSQL: pgsql/src/backend/port/win32/timer.c,v 1.11 2006/08/09 20:40:56 momjian Exp $
15
15
*
16
16
*-------------------------------------------------------------------------
17
17
*/
@@ -56,8 +56,14 @@ pg_timer_thread(LPVOID param)
56
56
timerCommArea .value .it_value .tv_usec == 0 )
57
57
waittime = INFINITE ; /* Cancel the interrupt */
58
58
else
59
+ {
60
+ /* Minimum wait time is 1ms */
61
+ if (timerCommArea .value .it_value .tv_sec == 0 &&
62
+ timerCommArea .value .it_value .tv_usec < 1000 )
63
+ timerCommArea .value .it_value .tv_usec = 1000 ;
59
64
/* WaitForSingleObjectEx() uses milliseconds */
60
65
waittime = timerCommArea .value .it_value .tv_usec / 1000 + timerCommArea .value .it_value .tv_sec * 1000 ;
66
+ }
61
67
ResetEvent (timerCommArea .event );
62
68
LeaveCriticalSection (& timerCommArea .crit_sec );
63
69
}
You can’t perform that action at this time.
0 commit comments