aboutsummaryrefslogtreecommitdiff
path: root/src/backend/replication/walsender.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/replication/walsender.c')
-rw-r--r--src/backend/replication/walsender.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c
index 92bc6577848..b6c456f0c5a 100644
--- a/src/backend/replication/walsender.c
+++ b/src/backend/replication/walsender.c
@@ -2033,8 +2033,6 @@ WalSndComputeSleeptime(TimestampTz now)
if (wal_sender_timeout > 0 && last_reply_timestamp > 0)
{
TimestampTz wakeup_time;
- long sec_to_timeout;
- int microsec_to_timeout;
/*
* At the latest stop sleeping once wal_sender_timeout has been
@@ -2053,11 +2051,7 @@ WalSndComputeSleeptime(TimestampTz now)
wal_sender_timeout / 2);
/* Compute relative time until wakeup. */
- TimestampDifference(now, wakeup_time,
- &sec_to_timeout, &microsec_to_timeout);
-
- sleeptime = sec_to_timeout * 1000 +
- microsec_to_timeout / 1000;
+ sleeptime = TimestampDifferenceMilliseconds(now, wakeup_time);
}
return sleeptime;