mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-25 16:41:03 +03:00
Revert "use time comparion functions"
This reverts commit 2d0ae6b82b.
Possibly not use this for relative timestamps.
This commit is contained in:
1 parent
2d0ae6b82b
commit
c4cb5ce770
3 files changed
+6
-7
No files matched your search
+2
-2
@@ -398,12 +398,12 @@ main(int argc, char **argv) {
|
||||
nextpdu = coap_peek_next( ctx );
|
||||
|
||||
coap_ticks(&now);
|
||||
while (nextpdu && coap_time_le(nextpdu->t, now - ctx->sendqueue_basetime)) {
|
||||
while (nextpdu && nextpdu->t <= now - ctx->sendqueue_basetime) {
|
||||
coap_retransmit( ctx, coap_pop_next( ctx ) );
|
||||
nextpdu = coap_peek_next( ctx );
|
||||
}
|
||||
|
||||
if (nextpdu && coap_time_le(nextpdu->t, COAP_RESOURCE_CHECK_TIME)) {
|
||||
if ( nextpdu && nextpdu->t <= COAP_RESOURCE_CHECK_TIME ) {
|
||||
/* set timeout if there is a pdu to send before our automatic timeout occurs */
|
||||
tv.tv_usec = ((nextpdu->t) % COAP_TICKS_PER_SECOND) * 1000000 / COAP_TICKS_PER_SECOND;
|
||||
tv.tv_sec = (nextpdu->t) / COAP_TICKS_PER_SECOND;
|
||||
|
||||
Reference in new issue
Block a user