mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-02 16:05:50 +03:00
re-apply fix for timer calculation
This commit is contained in:
1 parent
695f04a5f9
commit
e35a1216f8
1 file changed
+1
-1
+1
-1
@@ -416,7 +416,7 @@ main(int argc, char **argv) {
|
||||
|
||||
if ( nextpdu && nextpdu->t <= now + COAP_RESOURCE_CHECK_TIME ) {
|
||||
/* set timeout if there is a pdu to send before our automatic timeout occurs */
|
||||
tv.tv_usec = ((nextpdu->t - now) % COAP_TICKS_PER_SECOND) << 10;
|
||||
tv.tv_usec = ((nextpdu->t - now) % COAP_TICKS_PER_SECOND) * 1000000 / COAP_TICKS_PER_SECOND;
|
||||
tv.tv_sec = (nextpdu->t - now) / COAP_TICKS_PER_SECOND;
|
||||
timeout = &tv;
|
||||
} else {
|
||||
|
||||
Reference in new issue
Block a user