Skip to content

Commit ca137aa

Browse files
committed
refactor: use div_ceil in idle time calculation
1 parent b21205e commit ca137aa

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

stacks-signer/src/signerdb.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1264,7 +1264,7 @@ impl SignerDb {
12641264
// Plus (ms + 999)/1000 to round up to the nearest second
12651265
let tenure_extend_timestamp = tenure_start_time
12661266
.saturating_add(tenure_idle_timeout_secs)
1267-
.saturating_add(tenure_process_time_ms.saturating_add(999) / 1000);
1267+
.saturating_add(tenure_process_time_ms.div_ceil(1000));
12681268
debug!("Calculated tenure extend timestamp";
12691269
"tenure_extend_timestamp" => tenure_extend_timestamp,
12701270
"tenure_start_time" => tenure_start_time,

0 commit comments

Comments
 (0)