Browse Source

Reformatted to fit 80 chars

Alois Mahdal 12 years ago
parent
commit
c095c4c1bc
1 changed files with 8 additions and 5 deletions
  1. 8
    5
      bin/timestamp.pl

+ 8
- 5
bin/timestamp.pl View File

23
 
23
 
24
 sub stamp {
24
 sub stamp {
25
     my $time = shift;
25
     my $time = shift;
26
-    my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = (localtime($time));
27
-    return sprintf "%04i-%02i-%02i %02i:%02i:%02i.%05i",
28
-                    $year + 1900,   $mon + 1,   $mday,
29
-                    $hour,          $min,       $sec,     ( modf $time)[0] * 100000;
26
+    my ($sec,   $min,   $hour,
27
+        $mday,  $mon,   $year,
28
+        $wday,  $yday,  $isdst) = (localtime($time));
29
+    return sprintf
30
+        "%04i-%02i-%02i %02i:%02i:%02i.%05i",
31
+        $year + 1900,   $mon + 1,   $mday,
32
+        $hour,          $min,       $sec,
33
+        ( modf $time)[0] * 100000;
30
 }
34
 }
31
 
35
 
32
-
33
 while (1) {
36
 while (1) {
34
     print stamp Time::HiRes::time();
37
     print stamp Time::HiRes::time();
35
     print "\n";
38
     print "\n";