Program timing functions based on C++'s chrono library