set_system_get_current_time_function

Replaces the current high-resolution time provider function with a user-supplied implementation and returns a pointer to the previously registered provider.

Prototype

            typedef  timer_unit (*mco_system_get_current_time_fptr_t)(void);
            ...
            mco_system_get_current_time_fptr_t set_system_get_current_time_function(
                /* IN */ mco_system_get_current_time_fptr_t fptr
            );

Arguments

fptr
A pointer to a user-defined function that returns the current time in system ticks.

Description

This function sets a new user-defined routine for obtaining the current time in ticks and returns a pointer to the routine that was previously in use.

Return Codes

This function returns a pointer to the time provider function that was active before this call.

Files

Header file:
mcotime.h
Source file:
mcosaltimer.c
Library:
libmcosaltimer.a
Header file:
mcotime.h
Source file:
mcosalhollow.c
Library:
libmcosalhollow.a