pub fn timestamp_seeded_rng_oracle() -> (u32, u32) {
    let now = SystemTime::now()
        .duration_since(SystemTime::UNIX_EPOCH)
        .unwrap();
    // simulate passage of time
    let r = rand::thread_rng().gen_range(80, 2000);
    let seed = now.checked_sub(Duration::from_secs(r)).unwrap().as_secs() as u32;

    // seed with timestamp and return random numbesrs
    let mut rng = MersenneRng::new(seed);
    (rng.extract_number(), seed)
}
// Wait a random number of seconds between 40 and 1000.
// Seeds the RNG with the current Unix timestamp
// Waits a random number of seconds again.
// Returns the first 32 bit output of the RNG.
Wait a random number of seconds between 40 and 1000.
Seeds the RNG with the current Unix timestamp
Waits a random number of seconds again.
Returns the first 32 bit output of the RNG.
Wait a random number of seconds between 40 and 1000 . Seeds the RNG with the current Unix timestamp Waits a random number of seconds again . Returns the first 32 bit output of the RNG .
pub fn timestamp_seeded_rng_oracle() -> (u32, u32) {
    let now = SystemTime::now()
        .duration_since(SystemTime::UNIX_EPOCH)
        .unwrap();
    // simulate passage of time
    let r = rand::thread_rng().gen_range(80, 2000);
    let seed = now.checked_sub(Duration::from_secs(r)).unwrap().as_secs() as u32;
    // seed with timestamp and return random numbesrs
    let mut rng = MersenneRng::new(seed);
    (rng.extract_number(), seed)
}
pub fn timestamp_seeded_rng_oracle ( ) -> ( u32 , u32 ) { let now = SystemTime :: now ( ) . duration_since ( SystemTime :: UNIX_EPOCH ) . unwrap ( ) ; // simulate passage of time let r = rand :: thread_rng ( ) . gen_range ( 80 , 2000 ) ; let seed = now . checked_sub ( Duration :: from_secs ( r ) ) . unwrap ( ) . as_secs ( ) as u32 ; // seed with timestamp and return random numbesrs let mut rng = MersenneRng :: new ( seed ) ; ( rng . extract_number ( ) , seed ) }
Wait a random number of seconds between 40 and 1000.
Wait a random number of seconds between 40 and 1000 .