Replaced time(0) by chrono