Skip to content

Commit

Permalink
feat: fix overflow time left
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyrix126 committed Jul 20, 2024
1 parent cc03709 commit d706dec
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/helper/xvb/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -822,8 +822,10 @@ fn update_indicator_algo(
// algo is mining on p2pool but will switch to XvB after
// show time remaining on p2pool
lock!(pub_api).stats_priv.time_switch_node = XVB_TIME_ALGO
- last_algorithm.lock().unwrap().elapsed().as_secs() as u32
- time_donated;
.checked_sub(last_algorithm.lock().unwrap().elapsed().as_secs() as u32)
.unwrap_or_default()
.checked_sub(time_donated)
.unwrap_or_default();
"time until switch to mining on XvB".to_string()
}
_ => {
Expand Down

0 comments on commit d706dec

Please sign in to comment.