use time::SystemTime instead of time::Instant as the latter may use libc::clock_gettime(CLOCK_MONOTONIC) eg. on android and does not advance while being in deep sleep mode. therefore, time::Instant is not a reliable way for timeouts or stoping times.

This commit is contained in:
B. Petersen
2020-07-13 01:07:05 +02:00
committed by link2xt
parent 6cb75114c1
commit 4b445b7dd7
3 changed files with 11 additions and 7 deletions

View File

@@ -53,7 +53,7 @@ impl Smtp {
"Message len={} was smtp-sent to {}",
message_len, recipients_display
)));
self.last_success = Some(std::time::Instant::now());
self.last_success = Some(std::time::SystemTime::now());
Ok(())
} else {