Use of c++11 methods for sleep instead of c usleep functions