public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 1/2] MdePkg/TimerLib: Add a function to calculate elapsed time
@ 2018-01-10  9:31 Pankaj Bansal
  2018-01-10  9:31 ` [PATCH 2/2] ArmPkg/ArmArchTimerLib: Implement GetElapsedTime function of TimerLib Pankaj Bansal
  0 siblings, 1 reply; 7+ messages in thread
From: Pankaj Bansal @ 2018-01-10  9:31 UTC (permalink / raw)
  To: edk2-devel; +Cc: Pankaj Bansal, Michael D Kinney, Liming Gao

This function calculates the time elaped in Naoseconds between call to
this function and BaseTime, which is passed as argument.

This is particularly useful in detecting timeout conditions.

Cc: Michael D Kinney <michael.d.kinney@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Pankaj Bansal <pankaj.bansal@nxp.com>

diff --git a/MdePkg/Include/Library/TimerLib.h b/MdePkg/Include/Library/TimerLib.h
index ecc3ad3..82a5c5c 100644
--- a/MdePkg/Include/Library/TimerLib.h
+++ b/MdePkg/Include/Library/TimerLib.h
@@ -111,4 +111,20 @@ GetTimeInNanoSecond (
   IN      UINT64                     Ticks
   );
 
+/**
+  Get Elapsed time in Nanoseonds w.r.t BaseTime
+
+  This function calculates the time elaped in Naoseconds between call to this
+  function and BaseTime, which is passed as argument.
+
+  @param  BaseTime     BaseTime in NanoSeconds.
+
+  @return The elapsed time in nanoseconds.
+
+**/
+UINT64
+EFIAPI
+GetElapsedTime (
+  IN      UINT64                     BaseTime
+  );
 #endif
-- 
2.7.4



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-01-11  9:53 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-10  9:31 [PATCH 1/2] MdePkg/TimerLib: Add a function to calculate elapsed time Pankaj Bansal
2018-01-10  9:31 ` [PATCH 2/2] ArmPkg/ArmArchTimerLib: Implement GetElapsedTime function of TimerLib Pankaj Bansal
2018-01-10 14:16   ` Laszlo Ersek
2018-01-10 16:05     ` Pankaj Bansal
2018-01-10 17:04       ` Laszlo Ersek
2018-01-11  6:28         ` Pankaj Bansal
2018-01-11  9:58           ` Laszlo Ersek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox