You don't need Time::HiRes if you always sleep to a multiple of the 1-second system clock, which sleep(2) does. Since your requirement was an integer multiple of 1 second, that's the simplest. Now, if you wanted a task performed every 59.23 seconds, yes, Time::HiRes would help.