finish sleep and usleep with c++ add-on