Skip to main content

read_virtual_timer

Function read_virtual_timer 

Source
pub fn read_virtual_timer() -> u64
Expand description

A free-standing function to get the current Virtual Timer value

In some circumstances (e.g. timestamping a defmt log) you just want to get the time and don’t want to drag around an object representing the whole timer.

This is just a thin wrapper around the relevant CPU register’s read function

  • this just has a more discoverable name.