Replace deprecated sys/timeb.h

sys/timeb.h has been made deprecated in some systems and has now been
removed in favour of std::chrono which is also more portable.