start porting to c++11 thread and time classes