October 23, 2024
Chicago 12, Melborne City, USA
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

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video