mbed library sources
Fork of mbed-src by
Diff: common/us_ticker_api.c
- Revision:
- 361:56c2a6244bba
- Parent:
- 304:89b9c3a9a045
- Child:
- 388:fc1c6dc472ca
diff -r 3a6dcb505230 -r 56c2a6244bba common/us_ticker_api.c --- a/common/us_ticker_api.c Mon Oct 20 09:15:07 2014 +0100 +++ b/common/us_ticker_api.c Tue Oct 21 08:15:06 2014 +0100 @@ -37,7 +37,7 @@ return; } - if ((int)(head->timestamp - us_ticker_read()) <= 0) { + if ((int64_t)(head->timestamp - us_ticker_read()) <= 0) { // This event was in the past: // point to the following one and execute its handler ticker_event_t *p = head; @@ -70,7 +70,7 @@ ticker_event_t *prev = NULL, *p = head; while (p != NULL) { /* check if we come before p */ - if ((int)(timestamp - p->timestamp) <= 0) { + if ((int64_t)(timestamp - p->timestamp) < 0) { break; } /* go to the next element */