Calculate time taken by program to run in uefi

45 Views Asked by At

I want to calculate how much time does my application take to run. I am trying to use ticks to calculate time elapsed. Basically using the PerformanceLib and TimerLib

Frequency = GetPerformanceCounterProperties(NULL, NULL);
StartTick = GetPerformanceCounter();
EndTick = GetPerformanceCounter();
ElapsedTicks = EndTick > StartTick ? EndTick - StartTick : StartTick - EndTick;
TimeInSeconds = (double)ElapsedTicks / Frequency;

I am getting 0 seconds everytime. Any leads for this ? Thanks in advance.

0

There are 0 best solutions below