Changeset 202 in flair-src for trunk/lib/FlairCore/src/Thread_impl.cpp


Ignore:
Timestamp:
11/02/17 15:04:47 (6 years ago)
Author:
Sanahuja Guillaume
Message:

modifs usleep

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/FlairCore/src/Thread_impl.cpp

    r186 r202  
    232232#else
    233233  self->SleepUntil(next_time);
    234   next_time += period;
     234  Time current = GetTime();
     235  if(current>next_time+period) self->Err("overrun of %lld\n", current-next_time);
     236  while (next_time < current) {
     237    next_time += period;
     238  }
    235239#endif
    236240  ComputeLatency(GetTime());
     
    326330  if(last!=0)
    327331#endif
    328     { Printf("Thread::%s :\n", self->ObjectName().c_str()); }
     332    { Printf("Thread::%s :\n", self->ObjectName().c_str());
     333    if(period_set) {Printf("    period (ns): %lld\n", period);}}
    329334#ifdef __XENO__
    330335    Printf("    number of context switches: %i\n", info.ctxswitches);
     
    349354      Printf("    max latency (ns): %lld\n", max_latency);
    350355      Printf("    latency moy (ns): %lld\n", mean_latency / cpt);
    351       Printf("    itertions: %lld\n", cpt);
     356      Printf("    iterations: %lld\n", cpt);
    352357    }
    353358  }
Note: See TracChangeset for help on using the changeset viewer.