mirror of
https://github.com/chatmail/core.git
synced 2026-05-25 01: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)
|
.duration_since(SystemTime::UNIX_EPOCH)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
if t > 0 {
|
if t > 0 {
|
||||||
println!("{:?} {:?} {:?}", t, now, Duration::new(t, 0));
|
let t = Duration::new(t, 0);
|
||||||
wakeup_time = Duration::new(t, 0) - now;
|
if t > now {
|
||||||
|
wakeup_time = t - now;
|
||||||
|
} else {
|
||||||
|
wakeup_time = Duration::new(0, 0);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user