in reply to Days between 2 dates ?
If the time() - $start_time is 3820 seconds (which is exactly 1h, 3m, 40s), you get it rounded to fit within two expressed units: "Runtime: 1 hour and 4 minutes.". Using duration_exact instead would return "Runtime: 1 hour, 3 minutes, and 40 seconds".use Time::Duration; print "Runtime ", duration(time() - $start_time), ".\n";
|
|---|