]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BaseTimerLibNullTemplate/TimerLibNull.c
Update the copyright notice format
[mirror_edk2.git] / MdePkg / Library / BaseTimerLibNullTemplate / TimerLibNull.c
CommitLineData
e1f414b6 1/** @file\r
2 A non-functional instance of the Timer Library.\r
3\r
19388d29
HT
4 Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.<BR>\r
5 This program and the accompanying materials\r
e1f414b6 6 are licensed and made available under the terms and conditions of the BSD License\r
7 which accompanies this distribution. The full text of the license may be found at\r
8 http://opensource.org/licenses/bsd-license.php\r
9\r
10 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
11 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
12\r
e1f414b6 13**/\r
14\r
c7d265a9 15#include <Base.h>\r
c7d265a9 16#include <Library/TimerLib.h>\r
17#include <Library/DebugLib.h>\r
e1f414b6 18\r
19/**\r
71871514 20 Stalls the CPU for at least the given number of microseconds.\r
21\r
e1f414b6 22 Stalls the CPU for the number of microseconds specified by MicroSeconds.\r
23\r
24 @param MicroSeconds The minimum number of microseconds to delay.\r
25\r
8cefc2ee 26 @return The value of MicroSeconds inputted.\r
e1f414b6 27\r
28**/\r
29UINTN\r
30EFIAPI\r
31MicroSecondDelay (\r
32 IN UINTN MicroSeconds\r
33 )\r
34{\r
35 ASSERT (FALSE);\r
36 return MicroSeconds;\r
37}\r
38\r
39/**\r
71871514 40 Stalls the CPU for at least the given number of nanoseconds.\r
41\r
e1f414b6 42 Stalls the CPU for the number of nanoseconds specified by NanoSeconds.\r
43\r
44 @param NanoSeconds The minimum number of nanoseconds to delay.\r
45\r
8cefc2ee 46 @return The value of NanoSeconds inputted.\r
e1f414b6 47\r
48**/\r
49UINTN\r
50EFIAPI\r
51NanoSecondDelay (\r
52 IN UINTN NanoSeconds\r
53 )\r
54{\r
55 ASSERT (FALSE);\r
56 return 0;\r
57}\r
58\r
59/**\r
71871514 60 Retrieves the current value of a 64-bit free running performance counter.\r
61\r
62 The counter can either count up by 1 or count down by 1. If the physical\r
e1f414b6 63 performance counter counts by a larger increment, then the counter values\r
64 must be translated. The properties of the counter can be retrieved from\r
65 GetPerformanceCounterProperties().\r
66\r
67 @return The current value of the free running performance counter.\r
68\r
69**/\r
70UINT64\r
71EFIAPI\r
72GetPerformanceCounter (\r
73 VOID\r
74 )\r
75{\r
76 ASSERT (FALSE);\r
77 return 0;\r
78}\r
79\r
80/**\r
81 Retrieves the 64-bit frequency in Hz and the range of performance counter\r
82 values.\r
83\r
84 If StartValue is not NULL, then the value that the performance counter starts\r
85 with immediately after is it rolls over is returned in StartValue. If\r
86 EndValue is not NULL, then the value that the performance counter end with\r
87 immediately before it rolls over is returned in EndValue. The 64-bit\r
88 frequency of the performance counter in Hz is always returned. If StartValue\r
89 is less than EndValue, then the performance counter counts up. If StartValue\r
90 is greater than EndValue, then the performance counter counts down. For\r
91 example, a 64-bit free running counter that counts up would have a StartValue\r
92 of 0 and an EndValue of 0xFFFFFFFFFFFFFFFF. A 24-bit free running counter\r
93 that counts down would have a StartValue of 0xFFFFFF and an EndValue of 0.\r
94\r
95 @param StartValue The value the performance counter starts with when it\r
96 rolls over.\r
97 @param EndValue The value that the performance counter ends with before\r
98 it rolls over.\r
99\r
100 @return The frequency in Hz.\r
101\r
102**/\r
103UINT64\r
104EFIAPI\r
105GetPerformanceCounterProperties (\r
106 OUT UINT64 *StartValue, OPTIONAL\r
107 OUT UINT64 *EndValue OPTIONAL\r
108 )\r
109{\r
110 ASSERT (FALSE);\r
e19c2c4a 111\r
112 return (UINT64)(-1);\r
e1f414b6 113}\r