Skip to content

Improvements to PlatformHelper::waitFor(), BackgroundWorker and Time::sleep()

Improvements for core::PlatformHelper::waitFor().

New Features

  • [core]:
    • PlatformHelper: added functions waitFor(const uin64_t& seconds, const uint64_t& nanoSeconds) and waitFor(const timespec& duration) for precise sleeping
    • PlatformHelper: Renamed waitFor(const unsigned int microSeconds) to waitForAccurate(...). This method compensates timer quantization errors on supported platforms.
    • Time: now uses new waitFor with nanosecond precision. This also fixes a bug with delays > 1s (see below)
  • [parallel]:
    • BackgroundWorker: now uses Time::sleep for sleeping

Bug Fixes

  • [core]:
    • PlatformHelper::waitFor/Time:sleep: Delays greater than one second were not executed properly on ALL platforms: Closes #23 (closed)
Edited by Ghost User

Merge request reports