Skip to main content

Module util

Module util 

Source
Expand description

Helper functionality used by the rest of tor-guardmgr.

Re-exportsยง

use rand::Rng; ๐Ÿ”’
use std::time::Duration; ๐Ÿ”’
use std::time::SystemTime; ๐Ÿ”’
use tor_basic_utils::RngExt as _; ๐Ÿ”’

Functionsยง

randomize_time ๐Ÿ”’
Return a random time within the range when-max ..= when.
round_time ๐Ÿ”’
Round when to a multiple of d seconds relative to epoch.