]> git.proxmox.com Git - mirror_edk2.git/blame - MdePkg/Library/BaseTimerLibNullTemplate/TimerLibNull.c
Removed MdePkg usage of ModuleName: in file headers
[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
4 Copyright (c) 2007, Intel Corporation<BR>\r
5 All rights reserved. This program and the accompanying materials\r
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
15//\r
c7d265a9 16// The package level header files this module uses\r
e1f414b6 17//\r
c7d265a9 18#include <Base.h>\r
19//\r
20// The protocols, PPI and GUID defintions for this module\r
21//\r
22//\r
23// The Library classes this module consumes\r
24//\r
25#include <Library/TimerLib.h>\r
26#include <Library/DebugLib.h>\r
e1f414b6 27\r
28/**\r
29 Stalls the CPU for at least the given number of microseconds.\r
30\r
31 Stalls the CPU for the number of microseconds specified by MicroSeconds.\r
32\r
33 @param MicroSeconds The minimum number of microseconds to delay.\r
34\r
35 @return MicroSeconds\r
36\r
37**/\r
38UINTN\r
39EFIAPI\r
40MicroSecondDelay (\r
41 IN UINTN MicroSeconds\r
42 )\r
43{\r
44 ASSERT (FALSE);\r
45 return MicroSeconds;\r
46}\r
47\r
48/**\r
49 Stalls the CPU for at least the given number of nanoseconds.\r
50\r
51 Stalls the CPU for the number of nanoseconds specified by NanoSeconds.\r
52\r
53 @param NanoSeconds The minimum number of nanoseconds to delay.\r
54\r
55 @return NanoSeconds\r
56\r
57**/\r
58UINTN\r
59EFIAPI\r
60NanoSecondDelay (\r
61 IN UINTN NanoSeconds\r
62 )\r
63{\r
64 ASSERT (FALSE);\r
65 return 0;\r
66}\r
67\r
68/**\r
69 Retrieves the current value of a 64-bit free running performance counter.\r
70\r
71 Retrieves the current value of a 64-bit free running performance counter. The\r
72 counter can either count up by 1 or count down by 1. If the physical\r
73 performance counter counts by a larger increment, then the counter values\r
74 must be translated. The properties of the counter can be retrieved from\r
75 GetPerformanceCounterProperties().\r
76\r
77 @return The current value of the free running performance counter.\r
78\r
79**/\r
80UINT64\r
81EFIAPI\r
82GetPerformanceCounter (\r
83 VOID\r
84 )\r
85{\r
86 ASSERT (FALSE);\r
87 return 0;\r
88}\r
89\r
90/**\r
91 Retrieves the 64-bit frequency in Hz and the range of performance counter\r
92 values.\r
93\r
94 If StartValue is not NULL, then the value that the performance counter starts\r
95 with immediately after is it rolls over is returned in StartValue. If\r
96 EndValue is not NULL, then the value that the performance counter end with\r
97 immediately before it rolls over is returned in EndValue. The 64-bit\r
98 frequency of the performance counter in Hz is always returned. If StartValue\r
99 is less than EndValue, then the performance counter counts up. If StartValue\r
100 is greater than EndValue, then the performance counter counts down. For\r
101 example, a 64-bit free running counter that counts up would have a StartValue\r
102 of 0 and an EndValue of 0xFFFFFFFFFFFFFFFF. A 24-bit free running counter\r
103 that counts down would have a StartValue of 0xFFFFFF and an EndValue of 0.\r
104\r
105 @param StartValue The value the performance counter starts with when it\r
106 rolls over.\r
107 @param EndValue The value that the performance counter ends with before\r
108 it rolls over.\r
109\r
110 @return The frequency in Hz.\r
111\r
112**/\r
113UINT64\r
114EFIAPI\r
115GetPerformanceCounterProperties (\r
116 OUT UINT64 *StartValue, OPTIONAL\r
117 OUT UINT64 *EndValue OPTIONAL\r
118 )\r
119{\r
120 ASSERT (FALSE);\r
121 return 0;\r
122}\r