Timer类 参考

Timer Class. 更多...

#include <cpp_timer.h>

Public 成员函数

kstat_t create (const name_t *name, timer_cb_t cb, uint32_t millisec, void *arg)
 
kstat_t destory (void)
 
kstat_t start (void)
 
kstat_t stop (void)
 
ktimer_t * self (void)
 

详细描述

Timer Class.

在文件 cpp_timer.h21 行定义.

成员函数说明

◆ create()

kstat_t create ( const name_t *  name,
timer_cb_t  cb,
uint32_t  millisec,
void *  arg 
)

This function will create a timer

参数
[in]namename of the timer
[in]cbcallbak of the timer
[in]millisecmillisec of timer period
[in]argthe argument of the callback
返回
the operation status, RHINO_SUCCESS is OK, others is error

◆ destory()

kstat_t destory ( void  )

This function will delete a timer

参数
[in]NULL
返回
the operation status, RHINO_SUCCESS is OK, others is error

◆ self()

ktimer_t* self ( void  )

This function will get a Semaphore struct pointer

参数
[in]none
返回
Semaphore struct pointer

◆ start()

kstat_t start ( void  )

This function will start a timer

参数
[in]NULL
返回
the operation status, RHINO_SUCCESS is OK, others is error

◆ stop()

kstat_t stop ( void  )

This function will stop a timer

参数
[in]NULL
返回
the operation status, RHINO_SUCCESS is OK, others is error

该类的文档由以下文件生成: