49 #ifndef _CL_TIMER_API_H_
50 #define _CL_TIMER_API_H_
142 CL_TIMER_MAX_CONTEXT,
145 #define CL_TIMER_TYPE_STR(type) ( (type) == CL_TIMER_ONE_SHOT ? "one shot" : \
146 ((type) == CL_TIMER_REPETITIVE) ? "repetitive" : "volatile" )
148 #define CL_TIMER_CONTEXT_STR(ctxt) ( (ctxt) == CL_TIMER_SEPARATE_CONTEXT ? "thread": "inline" )
150 typedef struct ClTimerStats
264 void* pActionArgument,
372 void *pActionArgument,
439 ClUint32T* pTimerType);
442 ClTimerReplicationCallbackT replicationCallback);
448 ClUint32T timerDataSize,
455 ClUint32T timerDataSize,
468 ClRcT clTimerClusterConfigureAll(
void);
472 ClRcT clTimerClusterSync(
void);
475 ClTimerReplicationCallbackT replicationCallback);
481 ClRcT clTimerStatsGet(ClTimerStatsT **ppStats, ClUint32T *pNumTimers);
Typical defines found in any software project.
Header file of Buffer Management related APIs.
ClPtrT ClBufferHandleT
The type of the handle for the buffer messages.
Definition: clBufferApi.h:82
ClUint32T ClRcT
Clovis return code type.
Definition: clCommon.h:168
ClInt64T ClTimeT
Time duration specified in nanoseconds.
Definition: clCommon.h:154
ClRcT clTimerInitialize(ClPtrT pConfig)
Initializes the Timer library.
ClRcT clTimerTypeGet(ClTimerHandleT timerHandle, ClUint32T *pTimerType)
Returns the timer type.
ClPtrT ClTimerHandleT
The type of the handle identifying the timer.
Definition: clTimerApi.h:82
ClRcT clTimerConfigInitialize(void *pConfigData)
Configures the Timer library.
ClRcT clTimerRestart(ClTimerHandleT timerHandle)
Restarts a timer.
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.
ClRcT(* ClTimerCallBackT)(void *)
The type fo the callback fucntion that will be called on timer expiry.
Definition: clTimerApi.h:68
ClRcT clTimerFinalize(void)
Cleans up the Timer library.
@ CL_TIMER_ONE_SHOT
Fire just once.
Definition: clTimerApi.h:119
@ CL_TIMER_REPETITIVE
Fire periodically.
Definition: clTimerApi.h:121
@ CL_TIMER_TASK_CONTEXT
Use the timer thread.
Definition: clTimerApi.h:139
@ 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
ClUint32T tsMilliSec
Number of Milliseconds.
Definition: clTimerApi.h:91
It contains the timer library configuration information.
Definition: clTimerApi.h:99
ClUint32T timerResolution
Timer resolution in milliseconds.
Definition: clTimerApi.h:104
ClUint32T timerTaskPriority
Timer task priority.
Definition: clTimerApi.h:109