subroutineprogress_tick
subroutine progress_tick(steps)
Count a step, or steps of them. This can be called from any thread.
Arguments
| Name | Type | Intent | Attributes | Description |
|---|---|---|---|---|
| steps | integer | in | optional | how many steps |
Calls
Source
Show the code
subroutine progress_tick(steps)
integer, intent(in), optional :: steps !! how many steps
integer(int64) :: now
integer :: amount
if (.not. enabled) return
amount = 1
if (present(steps)) amount = steps
!$omp atomic
done = done + amount
if (.not. live .or. omp_get_thread_num() /= 0) return
call system_clock(now)
if ((now - last_draw)*1000 < REDRAW_MILLISECONDS*rate) return
last_draw = now
!$omp critical (file_io)
call draw()
!$omp end critical (file_io)
end subroutine progress_tick