X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdePkg%2FInclude%2FLibrary%2FTimerLib.h;h=ecc3ad3ff79ec7b69a7004f667d12035126f0a0d;hb=62ec4a5ef674846f3edd0317e59b0c509873b3b5;hp=8f31bbb5f32f5d7c9de0c2c34921a27546dc2f37;hpb=fb3df220f89e6eecaf1862b9241d8a1214eeda1c;p=mirror_edk2.git diff --git a/MdePkg/Include/Library/TimerLib.h b/MdePkg/Include/Library/TimerLib.h index 8f31bbb5f3..ecc3ad3ff7 100644 --- a/MdePkg/Include/Library/TimerLib.h +++ b/MdePkg/Include/Library/TimerLib.h @@ -1,16 +1,14 @@ /** @file - Timer Library Functions + Provides calibrated delay and performance counter services. - Copyright (c) 2006, Intel Corporation - All rights reserved. This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php +Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.
+This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. - - Module Name: TimerLib.h +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -24,7 +22,7 @@ @param MicroSeconds The minimum number of microseconds to delay. - @return MicroSeconds + @return The value of MicroSeconds inputted. **/ UINTN @@ -40,7 +38,7 @@ MicroSecondDelay ( @param NanoSeconds The minimum number of nanoseconds to delay. - @return NanoSeconds + @return The value of NanoSeconds inputted. **/ UINTN @@ -52,8 +50,7 @@ NanoSecondDelay ( /** Retrieves the current value of a 64-bit free running performance counter. - Retrieves the current value of a 64-bit free running performance counter. The - counter can either count up by 1 or count down by 1. If the physical + The counter can either count up by 1 or count down by 1. If the physical performance counter counts by a larger increment, then the counter values must be translated. The properties of the counter can be retrieved from GetPerformanceCounterProperties(). @@ -97,4 +94,21 @@ GetPerformanceCounterProperties ( OUT UINT64 *EndValue OPTIONAL ); +/** + Converts elapsed ticks of performance counter to time in nanoseconds. + + This function converts the elapsed ticks of running performance counter to + time value in unit of nanoseconds. + + @param Ticks The number of elapsed ticks of running performance counter. + + @return The elapsed time in nanoseconds. + +**/ +UINT64 +EFIAPI +GetTimeInNanoSecond ( + IN UINT64 Ticks + ); + #endif