in reply to Argument "CLOCK_REALTIME" isn't numeric in subroutine entry

You will need to import CLOCK_REALTIME too:

use Time::HiRes qw( clock_gettime clock_getres CLOCK_REALTIME );

Also see the EXAMPLES section of Time::HiRes, where the correct import is shown.

Replies are listed 'Best First'.
Re^2: Argument "CLOCK_REALTIME" isn't numeric in subroutine entry
by thanos1983 (Parson) on Sep 18, 2014 at 11:33 UTC

    Hello Corion,

    OMG!!!! So simple and I was thinking about it. I did not scroll the page to the bottom to see that. Sometimes the answer is so simple.

    Thank you for your time and effort, quick question in case you know the answer. Those two commands are also compatible in Windows and MAC OS's?

    I am developing a sample of code and I am looking for compatibility with all OS environments.

    Seeking for Perl wisdom...on the process of learning...not there...yet!