An inline and updateable command prompt progress bar
Example usage
use variableKind use ProgressBar_Class type(ProgressBar) :: P integer(i32) :: i, N N = 100000 call P%set(N, time = .false.) call P%print(0) do i = 1, N Compute some stuff call P%print(i) enddo call P%set(N, time = .true.) call P%print(0) do i = 1, N Compute some stuff call P%print(i) enddo
Interfaced with class instantiation ProgressBar()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i32), | intent(in) | :: | N | Maximum expected number of iterations |
||
character(len=*), | intent(in), | optional | :: | title | Title to give the progress bar |
|
logical, | intent(in), | optional | :: | time | Show an estimated time to completion? |
Interfaced with class instantiation ProgressBar()
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=i64), | intent(in) | :: | N | Maximum expected number of iterations |
||
character(len=*), | intent(in), | optional | :: | title | Title to give the progress bar |
|
logical, | intent(in), | optional | :: | time | Show an estimated time to completion? |
A progress bar that displays a moving counter with percentage and optional estimated time remaining Print the progress Bar
private function ProgressBar_i1(N, title, time) | Interfaced with class instantiation ProgressBar() |
private function ProgressBar_id1(N, title, time) | Interfaced with class instantiation ProgressBar() |
generic, public :: print => print_i1_ProgressBar_, print_id1_ProgressBar_ | Print the progress Bar |