z-stack中byte osal_start_time和osal_start_timerEx区别

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

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的文档。

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

转载于:https://www.cnblogs.com/farbeyond/p/5204704.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值