diff options
Diffstat (limited to 'src/backend/replication/walsender.c')
-rw-r--r-- | src/backend/replication/walsender.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/backend/replication/walsender.c b/src/backend/replication/walsender.c index dc4b86ba683..86e6f4e433b 100644 --- a/src/backend/replication/walsender.c +++ b/src/backend/replication/walsender.c @@ -2079,8 +2079,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 @@ -2099,11 +2097,7 @@ WalSndComputeSleeptime(TimestampTz now) wal_sender_timeout / 2); /* Compute relative time until wakeup. */ - TimestampDifference(now, wakeup_time, - &sec_to_timeout, µsec_to_timeout); - - sleeptime = sec_to_timeout * 1000 + - microsec_to_timeout / 1000; + sleeptime = TimestampDifferenceMilliseconds(now, wakeup_time); } return sleeptime; |