Use utils.cpp to calculate time.