osOpenTimer function
Declaration:
HANDLE osOpenTimer(
  SYSNAME Name
);
Parameters:
Name

The unique name assigned to the timer object to be opened.

Return value:

Returns a valid handle to the opened timer object upon success, or NULL_HANDLE if the operation fails. To retrieve extended error information, call the osGetLastError function.

Description:

This function opens an existing named timer object.

Timer objects provide mechanisms for task synchronization relative to specific time points or intervals. Functionally similar to events, timers transition to the signaled state whenever a specified duration elapses and return to the non-signaled state upon being reset.

When a timer is created, an optional name can be assigned to it, enabling other tasks to retrieve a handle to the object using the osOpenTimer function. Once a task has finished using the timer, it must release the handle using osCloseHandle. The timer object is deleted by the system only after all tasks that opened it have closed their respective handles. For further details, refer to the System Objects Management section.

To optimize memory usage, if no osOpen* functions are called within the application, the system ignores object names and excludes the name management logic from the kernel. This reduces the final footprint of the executable image. Detailed information regarding object naming and opening is available in the System Objects Management section.

For additional details regarding timer behavior and synchronization, see the Timer Objects section.

This function is available only when both OS_USE_TIMER and OS_OPEN_TIMER_FUNC configuration constants are set to 1. If the function is not required by the application, set OS_OPEN_TIMER_FUNC to 0 to minimize the output code size.

Version:1.0
Header file:OS_Timer.h (include OS_API.h)
See also: HANDLE, NULL_HANDLE, OS_OPEN_TIMER_FUNC, osCloseHandle, osCreateTimer, osGetLastError, SYSNAME, system objects management, timers
SpaceShadow documentation