my $start = time; while ( (my $diff = time - $start) < 60) { sleep(60-$diff) }