mirror of
https://github.com/YGGverse/aquatic.git
synced 2026-04-01 10:15:31 +00:00
udp: network: update ValidUntil structs less often
This commit is contained in:
parent
9c919a6ecb
commit
a530dc2860
2 changed files with 16 additions and 3 deletions
|
|
@ -23,6 +23,9 @@ impl ValidUntil {
|
|||
pub fn new(offset_seconds: u64) -> Self {
|
||||
Self(Instant::now() + Duration::from_secs(offset_seconds))
|
||||
}
|
||||
pub fn new_with_now(now: Instant, offset_seconds: u64) -> Self {
|
||||
Self(now + Duration::from_secs(offset_seconds))
|
||||
}
|
||||
}
|
||||
|
||||
/// Extract response peers
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue