replaced sleep() with hpx sleep