Help for this page

Select Code to Download


  1. or download this
    $|= 1;
    my $next= time() + 60;
    while( 1 ) {
    ...
        sleep $next-time();
        $next += 60;
    }
    
  2. or download this
    use Time::HiRes;
    $|= 1;
    my( $next, $us )= gettimeofday();
    ...
        $next += 60;
        usleep tv_interval( [$next,$us], [gettimeofday()] );
    }