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 ef59d8b840f..d31e996a065 100644 --- a/src/backend/replication/walsender.c +++ b/src/backend/replication/walsender.c @@ -1784,8 +1784,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 @@ -1804,11 +1802,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; |