/* This function converts the elapsed ticks of running performance counter to time value in unit of nanoseconds. */
UINT64 EFIAPI GetTimeInNanoSecond(IN UINT64 Ticks)
/* This function converts the elapsed ticks of running performance counter to time value in unit of nanoseconds. */
UINT64 EFIAPI GetTimeInNanoSecond(IN UINT64 Ticks)
{
  UINT64  NanoSeconds;
  UINT32  Remainder;
  UINT32  TimerFreq;
  TimerFreq = GetPlatformTimerFreq ();
  NanoSeconds = MULT_U64_X_N (
                  DivU64x32Remainder (
                    Ticks,
                    TimerFreq,
                    &Remainder
                    ),
                  1000000000U
                  );
  NanoSeconds += DivU64x32 (
                   MULT_U64_X_N (
                     (UINT64)Remainder,
                     1000000000U
                     ),
                   TimerFreq
                   );
  return NanoSeconds;
}