Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8f73c88

Browse files
committed
Fix statement_timeout on Win32 so that it properly treats micro-seconds
as micro-seconds, rather than as 100 microseconds, as it does now. Thisactually fixes all setitimer calls on Win32, but statement_timeout isthe most visible fix.Backpatch to 8.1.X. 8.0 works as documented.
1 parentf896b5e commit8f73c88

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

‎src/backend/port/win32/timer.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
* Portions Copyright (c) 1996-2006, PostgreSQL Global Development Group
1212
*
1313
* IDENTIFICATION
14-
* $PostgreSQL: pgsql/src/backend/port/win32/timer.c,v 1.9 2006/08/09 17:33:52 momjian Exp $
14+
* $PostgreSQL: pgsql/src/backend/port/win32/timer.c,v 1.10 2006/08/09 17:47:03 momjian Exp $
1515
*
1616
*-------------------------------------------------------------------------
1717
*/
@@ -56,7 +56,8 @@ pg_timer_thread(LPVOID param)
5656
timerCommArea.value.it_value.tv_usec==0)
5757
waittime=INFINITE;/* Cancel the interrupt */
5858
else
59-
waittime=timerCommArea.value.it_value.tv_usec /10+timerCommArea.value.it_value.tv_sec*1000;
59+
/* WaitForSingleObjectEx() uses milliseconds */
60+
waittime=timerCommArea.value.it_value.tv_usec /1000+timerCommArea.value.it_value.tv_sec*1000;
6061
ResetEvent(timerCommArea.event);
6162
LeaveCriticalSection(&timerCommArea.crit_sec);
6263
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp