mirror of
https://github.com/chatmail/core.git
synced 2026-05-01 20:36:31 +03:00
fix(dc_job): dont subtract too much
This commit is contained in:
@@ -1235,8 +1235,12 @@ unsafe fn get_next_wakeup_time(context: &dc_context_t, thread: libc::c_int) -> D
|
||||
.duration_since(SystemTime::UNIX_EPOCH)
|
||||
.unwrap();
|
||||
if t > 0 {
|
||||
println!("{:?} {:?} {:?}", t, now, Duration::new(t, 0));
|
||||
wakeup_time = Duration::new(t, 0) - now;
|
||||
let t = Duration::new(t, 0);
|
||||
if t > now {
|
||||
wakeup_time = t - now;
|
||||
} else {
|
||||
wakeup_time = Duration::new(0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user