Time-based task blockingΒΆ

OmpSs-2 defines a new API function named nanos6_wait_for that pauses the calling task for a specific time in microseconds. The task stops during that time approximately and yields the CPU to execute other tasks in the meantime:

uint64_t nanos6_wait_for(uint64_t time_us);

The function returns the actual time slept so that the caller task can make decisions based on that, for instance, to change the next sleep time.