Commits

Shlomi Fish committed 20e60b8

countdown

  • Participants
  • Parent commits 1baac6b

Comments (0)

Files changed (3)

shlomif-settings/git/.gitconfig

 [core]
     excludesfile = ~/conf/git/excludes
 [push]
-    default = matching
+    default = simple

shlomif-settings/home-bin-executables/bin/countdown

+#!/usr/bin/perl
+
+use strict;
+use warnings;
+
+use Time::HiRes qw(sleep time);
+use POSIX qw();
+use IO::Handle;
+
+my $delay = shift(@ARGV);
+
+STDOUT->autoflush(1);
+{
+    my $start = time();
+    my $end = $start + $delay;
+
+    my $last_printed;
+    while ((my $t = time()) < $end)
+    {
+        my $new_to_print = POSIX::floor($end - $t);
+        # print "$new_to_print\n";
+        if (!defined($last_printed) or $new_to_print != $last_printed)
+        {
+            $last_printed = $new_to_print;
+            print "Remaining $new_to_print/$delay", ' ' x 40, "\r";
+        }
+        sleep(0.1);
+    }
+}

shlomif-settings/home-bin-executables/bin/countdown.pl

-#!/usr/bin/perl
-
-use strict;
-use warnings;
-
-use Time::HiRes qw(sleep time);
-use POSIX qw();
-use IO::Handle;
-
-my $delay = shift(@ARGV);
-
-STDOUT->autoflush(1);
-{
-    my $start = time();
-    my $end = $start + $delay;
-
-    my $last_printed;
-    while ((my $t = time()) < $end)
-    {
-        my $new_to_print = POSIX::floor($end - $t);
-        # print "$new_to_print\n";
-        if (!defined($last_printed) or $new_to_print != $last_printed)
-        {
-            $last_printed = $new_to_print;
-            print "Remaining $new_to_print/$delay", ' ' x 40, "\r";
-        }
-        sleep(0.1);
-    }
-}