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
Called by
- build_graphs
- draw_some
- link_project
- load_project_sources
- render_documentation
- write_entity_pages
- write_site
Source
Show the code
subroutine progress_tick(steps)
integer, intent(in), optional :: steps !! how many steps
integer(int64) :: now
integer :: amount, count
if (.not. enabled) return
amount = 1
if (present(steps)) amount = steps
!$omp atomic capture
done = done + amount
count = done
!$omp end atomic
if (lines) then
call write_line(count)
return
end if
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