Name

cyg_clock_sysclock_handle() — Return a handle to the system clock

Synopsis

#include <cyg/kernel/kapi.h>
#include <cyg/clock/api.h>

cyg_handle_t cyg_clock_sysclock_handle(void);

Description

This function returns a handle to the clock object associated with the hardware clock driving the system time. This clock handle is usable with the kernel C API functions such as cyg_clock_to_counter(), and thereby with other kernel functions which use kernel counters such as kernel alarms.

However to be clear, this clock may or may not be the same clock as used for the kernel real-time clock. Users must avoid operations which could interfere with system operation, such as setting the clock resolution or deleting the clock.

Note that this function may be implemented as a macro, and therefore taking the address of this function is not supported.

This function is only supplied when the tick conversion functionality is enabled.

Return value

This function returns a cyg_handle_t which can be used as a handle for kernel C API clock functions. No errors are reported.