18#define TICKS_PER_MICRO_SEC (ArmGenericTimerGetTimerFreq ()/1000000U)
22#define MULT_U64_X_N MultU64x32
24#define MULT_U64_X_N MultU64x64
42 TimerFreq = ArmGenericTimerGetTimerFreq ();
44 ASSERT (TimerFreq != 0);
64 UINT64 SystemCounterVal;
65 UINT64 PreviousSystemCounterVal;
66 UINT64 DeltaCounterVal;
80 PreviousSystemCounterVal = ArmGenericTimerGetSystemCount ();
83 while (TimerTicks64 > 0) {
84 SystemCounterVal = ArmGenericTimerGetSystemCount ();
86 DeltaCounterVal = (SystemCounterVal - PreviousSystemCounterVal)
89 TimerTicks64 -=
MIN (TimerTicks64, DeltaCounterVal);
90 PreviousSystemCounterVal = SystemCounterVal;
118 MicroSeconds = NanoSeconds / 1000;
119 MicroSeconds += ((NanoSeconds % 1000) == 0) ? 0 : 1;
144 return ArmGenericTimerGetSystemCount ();
173 OUT UINT64 *StartValue OPTIONAL,
174 OUT UINT64 *EndValue OPTIONAL
177 if (StartValue !=
NULL) {
179 *StartValue = (UINT64)0ULL;
182 if (EndValue !=
NULL) {
184 *EndValue = 0xFFFFFFFFFFFFFFFFUL;
187 return (UINT64)ArmGenericTimerGetTimerFreq ();
217 NanoSeconds = MULT_U64_X_N (
UINT64 EFIAPI GetPerformanceCounterProperties(OUT UINT64 *StartValue OPTIONAL, OUT UINT64 *EndValue OPTIONAL)
UINT64 EFIAPI GetTimeInNanoSecond(IN UINT64 Ticks)
STATIC UINTN EFIAPI GetPlatformTimerFreq()
UINT64 EFIAPI GetPerformanceCounter(VOID)
UINTN EFIAPI MicroSecondDelay(IN UINTN MicroSeconds)
UINTN EFIAPI NanoSecondDelay(IN UINTN NanoSeconds)
UINT64 EFIAPI DivU64x32(IN UINT64 Dividend, IN UINT32 Divisor)
UINT64 EFIAPI DivU64x32Remainder(IN UINT64 Dividend, IN UINT32 Divisor, OUT UINT32 *Remainder OPTIONAL)