forked from projectmoon/tenebrous-dicebot
Switch to Duration::from_secs, because we don't need nanos.
This commit is contained in:
parent
7e23f80e42
commit
67291e6deb
|
@ -27,7 +27,7 @@ fn check_message_age(
|
|||
oldest_message_age: u64,
|
||||
) -> bool {
|
||||
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 {
|
||||
true
|
||||
|
|
Loading…
Reference in New Issue