And there is a second constraint: No CPAN. The corporate IT support for perl is "perl only" and is always a few years out-of-date. Thus natatime() is out of consideration :-(
So... it's ok to copy some code from PerlMonks which is probably thrown together in a few minutes and is untested and undocumented...
but it's not ok to copy code from a mature, well-documented, well-maintained, well-tested across multiple perl versions and OS's CPAN module which has an open license?
You better make sure no one copied the contents of the natatime sub (which is pure Perl) in any of the answers provided.