Clock utilities for timing measurements.
Provides a small wrapper over system_clock that standardizes rate/max
initialization and offers helpers for deltas and conversion to seconds.
These helpers are intended for lightweight runtime timing, not for strict profiling or performance benchmarking.
Compute tick delta between two readings with wraparound handling.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int64), | intent(in) | :: | t0 |
Start tick, end tick, and maximum tick before wrap. |
||
| integer(kind=int64), | intent(in) | :: | t1 |
Start tick, end tick, and maximum tick before wrap. |
||
| integer(kind=int64), | intent(in) | :: | max |
Start tick, end tick, and maximum tick before wrap. |
Convert ticks to seconds using a specified tick rate.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int64), | intent(in) | :: | ticks |
Tick delta and tick rate. |
||
| integer(kind=int64), | intent(in) | :: | rate |
Tick delta and tick rate. |
Initialize system_clock parameters.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int64), | intent(out) | :: | rate |
Clock tick rate and maximum tick count as reported by |
||
| integer(kind=int64), | intent(out) | :: | max |
Clock tick rate and maximum tick count as reported by |
Fetch the current clock tick count.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer(kind=int64), | intent(out) | :: | t |
Current tick count from |