updated the example to use std::chrono instead of time.h