You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by "nikitos1550 (via GitHub)" <gi...@apache.org> on 2023/05/17 14:05:37 UTC
[GitHub] [mynewt-nimble] nikitos1550 commented on issue #823: Events BLE_GAP_EVENT_DISC_COMPLETE and BLE_GAP_EVENT_ADV_COMPLETE are not received
nikitos1550 commented on issue #823:
URL: https://github.com/apache/mynewt-nimble/issues/823#issuecomment-1551462771
Hi!
How do you think is such solution valid?
```
bool ble_npl_callout_is_active(struct ble_npl_callout *c)
{
struct itimerspec its;
timer_gettime(c->c_timer, &its);
if (its.it_value.tv_sec == 0 && its.it_value.tv_nsec == 0) {
return 0;
} else {
// If timer seems active maybe struct property is not active?
return c->c_active;
}
}
```
I didn`t find any Linux method about active/nonactive timer property.
But If I understand right, we can check time before expiration and if it already expired (remaining time is 0), then seems
we can recognize it as not active.
P.S. As I can see only one shot timers created (interval is always 0)
P.P.S. From first look solution works, but I didn't go deep, so any useful comment are welcome.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@mynewt.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org