The Progress library.
This library provides an easy way for C programs to keep their users informed of how long a task is going to take. It provides the regular accoutrements: a text bar chart, a percentage completion display, and a calculation of the estimated time remaining. Each PInfo structure is logically separate, allowing you to have one object for each type of process you may be working with (as well as being thread safe). It also comes with a wide variety of added extras to make displaying time information easy.
The following libraries are required for Progress:
Progress bars have the following features:
- They use long integer precision for internal counts, and double precision (sub-microsecond) time resolution.
- Titles can be added and subtracted at will.
- Bars can have 'sub-bar' progress (for example, for displaying progress through reading each file of multiple files)
- Bars can be 'frozen' and 'thawed' (e.g. for user prompts) without affecting the time estimation - the 'frozen' time is not counted.
- The bar can be displayed each time through a loop, or only every specified (floating point) number of seconds.
- The bar can report to your program the total time elapsed, the number of seconds remaining, the completion ratio and the number of units processed per second.
Progress bars cannot keep track of ranges that are floating point numbers. This has yet to be a problem - casting to integer will usually have the same effect.
Progress bars keep their own internal value of what iteration they're up to. This means that you can use a progress bar to step through a loop that's counting down - as long as you set the minimum to be numerically lower than the maximum, the effect will be exactly the same.
Progress bars can also write extensive debugging output to a separate file; this is useful when adding features to the Progressor library. If you need to debug a progress bar on the fly, you can use the P_set_debugging() and P_clear_debugging() calls to turn debugging on and off. It also detects the 'PROGRESS_DEBUG' environment variable being set when the program using the progress bar is activated.
Generated on Wed Apr 9 14:51:28 2008 for Progress by
1.4.7