Code Examples.
Code Examples.
rc = clTimerLibInitialize();
ClTimeXXXT *pCookie = NULL;
pCookie =
clHeapCalloc(
sizeof(ClTimeXXXT),
sizeof(ClCharT));
if( NULL == pCookie )
{
}
*pCookie = YYYY;
clTstTimerCallback, &timerCookie,
&timerHandle);
ClRcT clTstTimerCallback(
void *pCookie)
{
}
ClTimeXXXT *pCookie = NULL;
pCookie =
clHeapCalloc(
sizeof(ClTimeXXXT),
sizeof(ClCharT));
if( NULL == pCookie )
{
}
*pCookie = YYYY;
clTstTimerCallback, &timerCookie,
&timerHandle);
{
}
{
}
{
}
{
}
{
}
rc = clTimerLibFinalize();
{
}
ClUint32T ClRcT
Clovis return code type.
Definition: clCommon.h:168
#define CL_OK
Every thing is OK.
Definition: clCommonErrors.h:68
#define CL_HANDLE_INVALID_VALUE
Defines.
Definition: clHandleApi.h:95
ClPtrT clHeapCalloc(CL_IN ClUint32T numChunks, CL_IN ClUint32T chunkSize)
Allocates memory for an array and initializes it to zero.
ClPtrT ClTimerHandleT
The type of the handle identifying the timer.
Definition: clTimerApi.h:82
ClRcT clTimerCreateAndStart(ClTimerTimeOutT timeOut, ClTimerTypeT type, ClTimerContextT timerTaskSpawn, ClTimerCallBackT fpAction, void *pActionArgument, ClTimerHandleT *pTimerHandle)
Creates a new timer and activates it.
ClRcT clTimerDelete(ClTimerHandleT *pTimerHandle)
Deletes a timer.
ClTimerTypeT
type of action on timer expiry.
Definition: clTimerApi.h:117
ClRcT clTimerCreate(ClTimerTimeOutT timeOut, ClTimerTypeT type, ClTimerContextT timerTaskSpawn, ClTimerCallBackT fpAction, void *pActionArgument, ClTimerHandleT *pTimerHandle)
Creates a timer.
ClTimerContextT
When the timer expires, decides the method of invocation of the timer callback function.
Definition: clTimerApi.h:137
ClRcT clTimerStart(ClTimerHandleT timerHandle)
Starts a timer.
ClRcT clTimerUpdate(ClTimerHandleT timerHandle, ClTimerTimeOutT newTimeout)
Updates a timer.
ClRcT clTimerStop(ClTimerHandleT timerHandle)
\breif Stops a timer.
@ CL_TIMER_ONE_SHOT
Fire just once.
Definition: clTimerApi.h:119
@ CL_TIMER_REPETITIVE
Fire periodically.
Definition: clTimerApi.h:121
@ CL_TIMER_SEPARATE_CONTEXT
A new thread will be created to invoke the callback.
Definition: clTimerApi.h:141
The timeout value in seconds and milliseconds.
Definition: clTimerApi.h:87
ClUint32T tsSec
Number of seconds of the timeout.
Definition: clTimerApi.h:89