App-timeput

 view release on metacpan or  search on metacpan

timeput  view on Meta::CPAN

#!/usr/bin/perl
use 5.008 ; use strict ; use warnings ; 
use Getopt::Std ;
use Getopt::Long qw [ GetOptions :config bundling no_ignore_case pass_through ] ; # GetOptionsFromArray ] ;
use Time::HiRes qw[ gettimeofday tv_interval sleep ] ; # Perl 5.7.3からコアモジュール
use Term::ANSIColor qw[ color :constants ] ; $Term::ANSIColor::AUTORESET = 1 ;
use FindBin qw[ $Script ] ; 

sub FB ($){FAINT BOLD $_[0]} 
sub Y ($){YELLOW $_[0]} 

GetOptions 'sleep=f' => \my$sleep ; 
getopts ".:b:c:dgsz:" , \my %o ; 

my ($t0s,$t0p) = gettimeofday ; # 「起動した時刻」の記録。15マイクロ秒のオーバーヘッド
$ENV{TZ} //= $o{z} ; # タイムゾーン

## Ctrl+Z 押下に対する反応 の指定
sub cZ { say STDERR CYAN "$. line(s) output so far. ($Script $$)" ; $SIG{TSTP} ='DEFAULT' ; kill 'TSTP', $$ } ;
$SIG{TSTP} = sub { cZ } ; 



( run in 1.700 second using v1.01-cache-2.11-cpan-97f6503c9c8 )