Help for this page

Select Code to Download


  1. or download this
      use Time::HiRes qw(clock_gettime CLOCK_REALTIME) ;
    
      my $t = clock_gettime(CLOCK_REALTIME) ;  # same as: my $t = Time::Hi
    +Res::time()
    
  2. or download this
      use Time::HiRes qw(clock_gettime CLOCK_PROCESS_CPUTIME_ID) ;
    
      my $cpu = clock_gettime(CLOCK_PROCESS_CPUTIME_ID) ;
    
  3. or download this
      use POSIX qw(CLOCKS_PER_SEC) ;
    
      my ($realtime, $user, $system, $cuser, $csystem) = POSIX::times() ;