#!/usr/bin/perl use strict; my $time_1 = time(); sleep 2; my $time_2 = time(); my $diff = $time_2 - $time_1; print scalar localtime( $time_1 ) . "\n"; print "Epoch Time 1: $time_1\n"; print scalar localtime( $time_2 ) . "\n"; print "Epoch Time 2: $time_2\n"; print "Difference: $diff seconds.\n";
In reply to Re: Compact script for time difference in seconds
by bichonfrise74
in thread Compact script for time difference in seconds
by vit
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |