/[Term-Shelly]/trunk/examples/progress_prompt.pl
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /trunk/examples/progress_prompt.pl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 7 - (show annotations)
Mon Jun 25 08:45:29 2007 UTC (16 years, 11 months ago) by dpavlin
File MIME type: text/plain
File size: 309 byte(s)
reorg directory structure so that examples are *not* installed together with module
1 #!/usr/bin/perl
2
3 use lib 'lib';
4 use Term::Shelly;
5
6 $sh = Term::Shelly->new();
7
8 $time = time();
9 $end = time() + 15;
10 $count = 0;
11
12 while (1) {
13 $sh->do_one_loop();
14 if ($time < time()) {
15 $count++;
16 $time = time();
17 $sh->prompt(sprintf("Download: %.2f", $count / 15) . "% >");
18 exit if ($time == $end);
19 }
20 }

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26