Switch to Duration::from_secs, because we don't need nanos.
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
7e23f80e42
commit
67291e6deb
|
@ -27,7 +27,7 @@ fn check_message_age(
|
||||||
oldest_message_age: u64,
|
oldest_message_age: u64,
|
||||||
) -> bool {
|
) -> bool {
|
||||||
let sending_time = event.origin_server_ts;
|
let sending_time = event.origin_server_ts;
|
||||||
let oldest_timestamp = SystemTime::now().sub(Duration::new(oldest_message_age, 0));
|
let oldest_timestamp = SystemTime::now().sub(Duration::from_secs(oldest_message_age));
|
||||||
|
|
||||||
if sending_time > oldest_timestamp {
|
if sending_time > oldest_timestamp {
|
||||||
true
|
true
|
||||||
|
|
Loading…
Reference in New Issue