CardSight 0.1.0
C API reference for the CardSight firmware and application
Loading...
Searching...
No Matches
delay.h File Reference

Delays and the wall clock: the kernel tick counts milliseconds from the boot. More...

#include <stdint.h>

Go to the source code of this file.

Functions

void msleep (uint32_t milliseconds)
 Sleep for a number of milliseconds.
uint64_t ktime_get_ms (void)
 Milliseconds since the scheduler started.

Detailed Description

Delays and the wall clock: the kernel tick counts milliseconds from the boot.

Function Documentation

◆ ktime_get_ms()

uint64_t ktime_get_ms ( void )

Milliseconds since the scheduler started.

Returns
The wall clock in milliseconds.

◆ msleep()

void msleep ( uint32_t milliseconds)

Sleep for a number of milliseconds.

Once the scheduler runs this yields the CPU through the kernel delay; before that it busy-waits on the cycle counter, so early init code can call it too.

Parameters
[in]millisecondsDelay length in milliseconds.