SHARE
TWEET

Untitled

a guest Apr 19th, 2019 102 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. use std::time::Duration;
  2.  
  3. fn main() {
  4.  
  5.     let hertz = 60;
  6.     let tick = Duration::from_secs(1) / hertz;
  7.     println!("{:?}, as millis: {}", tick, tick.as_millis());
  8.    
  9.     assert_eq!(tick.as_millis(), 16);
  10. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top