dsleep implementation via nanosleep syscall