diff options
| -rw-r--r-- | os/hal/platforms/Linux/hal_lld.c | 4 | 
1 files changed, 3 insertions, 1 deletions
| diff --git a/os/hal/platforms/Linux/hal_lld.c b/os/hal/platforms/Linux/hal_lld.c index a67790d8a..3f045b138 100644 --- a/os/hal/platforms/Linux/hal_lld.c +++ b/os/hal/platforms/Linux/hal_lld.c @@ -60,6 +60,8 @@ static struct timeval tick = {0, 1000000 / CH_FREQUENCY};  void hal_lld_init(void) {
    puts("Win32 ChibiOS/RT simulator (Linux)\n");
 +  gettimeofday(&nextcnt, NULL);
 +  timeradd(&nextcnt, &tick, &nextcnt);
  }
  /**
 @@ -77,7 +79,7 @@ void ChkIntSources(void) {  #endif
    gettimeofday(&tv, NULL);
 -  if (timercmp(&nextcnt, &tv, <)) {
 +  if (timercmp(&tv, &nextcnt, >=)) {
      timeradd(&nextcnt, &tick, &nextcnt);
      chSysTimerHandlerI();
      if (chSchIsRescRequiredExI())
 | 
