首页 > 其他 > 详细

z-stack中byte osal_start_time和osal_start_timerEx区别

时间:2016-02-21 12:54:07      阅读:204      评论:0      收藏:0      [点我收藏+]

这两个函数看起来很相像,用的时候也很相似。很容易弄混淆,仔细看一下文档就知道其中的区别了。

osal_start_timer( )

This function is called to start a timer. When the timer expires, the given event bit will be set. The event will be set in the task from which the osal_start_timer function is called. To explicitly specify the task id, use the osal_start_timerEx() function instead of osal_start_timer().

 

osal_start_timerEx( ) This is very similar to osal_start_timer(), with the added parameter of taskID. This allows the caller to set the timer for another task. When in doubt, use this function over osal_start_timer().

由此可以看出前者是设置本事件的定时器的时间,而后者是设置下一个从另一个任务的时间。这个任务是协议栈下一次调用的任务。

相关的详细文档可以看z-stack的文档。

以上纯属个人理解,有错误之处请批评指正。

z-stack中byte osal_start_time和osal_start_timerEx区别

原文:http://www.cnblogs.com/farbeyond/p/5204704.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!