summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/backend/postmaster/postmaster.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/backend/postmaster/postmaster.c b/src/backend/postmaster/postmaster.c
index 18a68f80db7..bcd37869067 100644
--- a/src/backend/postmaster/postmaster.c
+++ b/src/backend/postmaster/postmaster.c
@@ -1478,10 +1478,12 @@ DetermineSleepTime(struct timeval * timeout)
if (next_wakeup != 0)
{
+ long secs;
int microsecs;
TimestampDifference(GetCurrentTimestamp(), next_wakeup,
- &timeout->tv_sec, &microsecs);
+ &secs, &microsecs);
+ timeout->tv_sec = secs;
timeout->tv_usec = microsecs;
/* Ensure we don't exceed one minute */