Mistake on this page?
Report an issue in GitHub or email us

Kernel interface functions

The Kernel namespace implements functions to read RTOS information. Currently it implements one function to read the current RTOS kernel millisecond tick count.

Kernel namespace reference

get_ms_count() example

Kernel implements one function named get_ms_count() to read the current RTOS kernel millisecond tick count. The below code snippet demonstrates use of the get_ms_count() function to calculate the elapsed time:

void send_data()
{
    // 64-bit time doesn't wrap for half a billion years, at least
    uint64_t now = Kernel::get_ms_count();
    //do some operations
    // ...

    uint64_t later = Kernel::get_ms_count();

    //calculate millisecs elapsed
    uint64_t elapsed_ms = later - now;
}
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.