#!perl -w use strict; my $file = 'c:/windows/bootstat.dat'; -e $file or die "no $file"; my $boot_days_ago = -M $file; my $boot_secs_ago = 86400 * $boot_days_ago; my $boot_time = int ( time - $boot_secs_ago) ; while(1) { my $t = time-$boot_time; printf "%4d h %2d m\r", int($t/3600), int(($t%3600)/60); sleep 1; }