(empty log message)
@@ -206,7 +206,7 @@ | ||
206 | 206 | /* Time deadline for the whole operation, note the result is invalid |
207 | 207 | when timeout is TIME_INFINITE or TIME_IMMEDIATE but in that case |
208 | 208 | the deadline is not used.*/ |
209 | - deadline = osalOsGetSystemTimeX() + timeout; | |
209 | + deadline = osalTimeAddX(osalOsGetSystemTimeX(), timeout); | |
210 | 210 | |
211 | 211 | while (true) { |
212 | 212 | /* Waiting until there is a character available or a timeout occurs.*/ |
@@ -219,7 +219,8 @@ | ||
219 | 219 | msg = osalThreadEnqueueTimeoutS(&iqp->q_waiting, timeout); |
220 | 220 | } |
221 | 221 | else { |
222 | - sysinterval_t next_timeout = deadline - osalOsGetSystemTimeX(); | |
222 | + sysinterval_t next_timeout = osalTimeDiffX(osalOsGetSystemTimeX(), | |
223 | + deadline); | |
223 | 224 | |
224 | 225 | /* Handling the case where the system time went past the deadline, |
225 | 226 | in this case next becomes a very high number because the system |
@@ -431,7 +432,7 @@ | ||
431 | 432 | /* Time deadline for the whole operation, note the result is invalid |
432 | 433 | when timeout is TIME_INFINITE or TIME_IMMEDIATE but in that case |
433 | 434 | the deadline is not used.*/ |
434 | - deadline = osalOsGetSystemTimeX() + timeout; | |
435 | + deadline = osalTimeAddX(osalOsGetSystemTimeX(), timeout); | |
435 | 436 | |
436 | 437 | while (true) { |
437 | 438 | msg_t msg; |
@@ -443,7 +444,8 @@ | ||
443 | 444 | msg = osalThreadEnqueueTimeoutS(&oqp->q_waiting, timeout); |
444 | 445 | } |
445 | 446 | else { |
446 | - sysinterval_t next_timeout = deadline - osalOsGetSystemTimeX(); | |
447 | + sysinterval_t next_timeout = osalTimeDiffX(osalOsGetSystemTimeX(), | |
448 | + deadline); | |
447 | 449 | |
448 | 450 | /* Handling the case where the system time went past the deadline, |
449 | 451 | in this case next becomes a very high number because the system |