Skip to content

Instantly share code, notes, and snippets.

@anon-hui
Created November 14, 2025 12:14
Show Gist options
  • Select an option

  • Save anon-hui/b645c33168229b4ffbe6a832443d123a to your computer and use it in GitHub Desktop.

Select an option

Save anon-hui/b645c33168229b4ffbe6a832443d123a to your computer and use it in GitHub Desktop.
perl -e 'use Time::HiRes qw(time sleep); use POSIX qw(strftime); vec($r="",0,1)=1;$|=1;print"-"x79,"\n";<STDIN>;for($s=$p=$t=time,$i=1;;$t=time){sub p{$a=sprintf"%7.2f",$_[1];strftime($_[0],gmtime$a).substr($a,-3)." $a"}print p("%F.%T",$t)," ",p("%T",$t-$s)," ",p("%M:%S",$t-$p)," $i\r"; select($ro=$r,undef,undef,0.001)>0 and<STDIN>,$p=$t,++$i}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment