Skip to content

Instantly share code, notes, and snippets.

@romuald
Created March 24, 2021 10:19
Show Gist options
  • Select an option

  • Save romuald/b10635936502a5cd7c14b8032ed03d46 to your computer and use it in GitHub Desktop.

Select an option

Save romuald/b10635936502a5cd7c14b8032ed03d46 to your computer and use it in GitHub Desktop.

Revisions

  1. romuald created this gist Mar 24, 2021.
    11 changes: 11 additions & 0 deletions timing.pl
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,11 @@
    #!/bin/env perl
    # Usage: anycommand | timing.pl
    use strict;
    use warnings;
    use Time::HiRes qw/time/;

    my $start = time();
    while (<>) {
    printf "%.3f ", time() - $start;
    print;
    }