| 1 | #pragma once |
| 2 | |
| 3 | #include <stdint.h> |
| 4 | #include <stdbool.h> |
| 5 | |
| 6 | typedef struct |
| 7 | { |
| 8 | uint64_t freq64; |
| 9 | double dFreqMulMicro, dFreqMulMs; |
| 10 | } hpcFreq_t; |
| 11 | |
| 12 | typedef struct |
| 13 | { |
| 14 | uint64_t durationInt, durationFrac; |
| 15 | uint64_t endTimeInt, endTimeFrac; |
| 16 | uint64_t frameCounter, resetFrame; |
| 17 | } hpc_t; |
| 18 | |
| 19 | extern hpcFreq_t hpcFreq; |
| 20 | |
| 21 | void hpc_Init(void); |
| 22 | void hpc_SetDurationInHz(hpc_t *hpc, double dHz); |
| 23 | void hpc_SetDurationInMs(hpc_t *hpc, double dMs); |
| 24 | void hpc_ResetCounters(hpc_t *hpc); |
| 25 | void hpc_Wait(hpc_t *hpc); |