/// Non-blocking delay function. Gives back the time in milliseconds since [start_time] was invoked.
///
/// # Example
///
/// ```rust,no_run
/// use rustuino::*;
///
/// let mut counter: usize = 0;
/// let delay: usize = 1000;
/// start_time();
///
/// loop {
///   if counter + delay >= millis() {
///     // Do something
///     counter = millis();
///   }
/// }
/// ```
Non-blocking delay function. Gives back the time in milliseconds since [start_time] was invoked.
Non - blocking delay function . Gives back the time in milliseconds since [ start_time ] was invoked .
pub fn millis() -> usize {
  let peripheral_ptr;
  unsafe {peripheral_ptr = stm32f4::stm32f446::Peripherals::steal();}
  let tim7 = &peripheral_ptr.TIM6;
  let buffer: usize;
  tim7.cr1.modify(|_, w| w.cen().disabled());
  buffer = free(|cs| *TIME_COUNTER.borrow(cs).borrow());
  tim7.cr1.modify(|_, w| w.cen().enabled());
  return buffer;
}
pub fn millis ( ) -> usize { let peripheral_ptr ; unsafe { peripheral_ptr = stm32f4 :: stm32f446 :: Peripherals :: steal ( ) ; } let tim7 = & peripheral_ptr . TIM6 ; let buffer : usize ; tim7 . cr1 . modify ( | _ , w | w . cen ( ) . disabled ( ) ) ; buffer = free ( | cs | * TIME_COUNTER . borrow ( cs ) . borrow ( ) ) ; tim7 . cr1 . modify ( | _ , w | w . cen ( ) . enabled ( ) ) ; return buffer ; }
Non-blocking delay function.
Non - blocking delay function .
example
```rust,no_run
use rustuino::*.

let mut counter: usize = 0;
let delay: usize = 1000;
start_time().

loop {
if counter + delay >= millis() {
Do something
counter = millis();
}
}
```
` ` ` rust no_run use rustuino :: * . let mut counter : usize = 0 ; let delay : usize = 1000 ; start_time () . loop { if counter + delay > = millis () { Do something counter = millis () ; } } ` ` `