OiO.lk Blog C# Calculate time taken by program to run in uefi
C#

Calculate time taken by program to run in uefi


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.



You need to sign in to view this answers

Exit mobile version