This is automatically generated documentation. Edit after the "COMMENTS" heading; changes to the main body will be lost.
ProgressBar -- Click element; prints a progress bar to standard error
ProgressBar(POSHANDLER [, SIZEHANDLER, KEYWORDS])
Ports: none
Drivers: userlevel
Package: userlevel (core)
Reads progress information from handlers, and displays an ASCII-art progress bar on standard error, indicating how much progress has been made and how much remains to go. POSHANDLER and SIZEHANDLER are read handlers. Each of them should return a nonnegative real number. POSHANDLER is checked each time the progress bar displays; SIZEHANDLER is checked just once, the first time the progress bar comes up. Intuitively, POSHANDLER represents the "position"; the process is complete when its value equals the "size" returned by SIZEHANDLER. You may give multiple position and/or size handlers, as a space-separated list; their values are added together. Keyword arguments are:
This ProgressBar shows how far into the file FromDump has gotten:
fd :: FromDump(~/largedump.gz) -> ... ProgressBar(fd.filepos, fd.filesize);
Here are some example progress bars. The first form occurs when the file size is known; the second, when it is not known.
74% |************** | 23315KB 00:01 ETA | *** | 5184KB --:-- ETA
Code based on the progress bar in the OpenSSH project's scp program, whose authors are listed as Timo Rinne, Tatu Ylonen, Theo de Raadt, and Aaron Campbell.
Generated by 'click-elem2man' from '../elements/userlevel/progressbar.hh' on 7/Mar/2009.