use Time::HiRes qw(clock_gettime CLOCK_REALTIME) ; my $t = clock_gettime(CLOCK_REALTIME) ; # same as: my $t = Time::HiRes::time() #### use Time::HiRes qw(clock_gettime CLOCK_PROCESS_CPUTIME_ID) ; my $cpu = clock_gettime(CLOCK_PROCESS_CPUTIME_ID) ; #### use POSIX qw(CLOCKS_PER_SEC) ; my ($realtime, $user, $system, $cuser, $csystem) = POSIX::times() ;
## use Time::HiRes qw(clock_gettime CLOCK_PROCESS_CPUTIME_ID) ; my $cpu = clock_gettime(CLOCK_PROCESS_CPUTIME_ID) ; ##
## use POSIX qw(CLOCKS_PER_SEC) ; my ($realtime, $user, $system, $cuser, $csystem) = POSIX::times() ;