updated the comment according to latest version of MWG.
[mirror_edk2.git] / MdePkg / Library / BaseTimerLibNullTemplate / TimerLibNull.c
CommitLineData
a416984c 1/** @file\r
ff242d40 2 A non-functional instance of the Timer Library.\r
a416984c 3\r
4faa5028 4 Copyright (c) 2007, Intel Corporation<BR>\r
a416984c 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
ff242d40 13 Module Name: TimerLibNull.c\r
a416984c 14\r
15**/\r
16\r
17/**\r
18 Stalls the CPU for at least the given number of microseconds.\r
19\r
20 Stalls the CPU for the number of microseconds specified by MicroSeconds.\r
21\r
22 @param MicroSeconds The minimum number of microseconds to delay.\r
23\r
24 @return MicroSeconds\r
25\r
26**/\r
27UINTN\r
28EFIAPI\r
29MicroSecondDelay (\r
30 IN UINTN MicroSeconds\r
31 )\r
32{\r
33 ASSERT (FALSE);\r
34 return MicroSeconds;\r
35}\r
36\r
37/**\r
38 Stalls the CPU for at least the given number of nanoseconds.\r
39\r
40 Stalls the CPU for the number of nanoseconds specified by NanoSeconds.\r
41\r
42 @param NanoSeconds The minimum number of nanoseconds to delay.\r
43\r
44 @return NanoSeconds\r
45\r
46**/\r
47UINTN\r
48EFIAPI\r
49NanoSecondDelay (\r
50 IN UINTN NanoSeconds\r
51 )\r
52{\r
53 ASSERT (FALSE);\r
54 return 0;\r
55}\r
56\r
57/**\r
58 Retrieves the current value of a 64-bit free running performance counter.\r
59\r
60 Retrieves the current value of a 64-bit free running performance counter. The\r
61 counter can either count up by 1 or count down by 1. If the physical\r
62 performance counter counts by a larger increment, then the counter values\r
63 must be translated. The properties of the counter can be retrieved from\r
64 GetPerformanceCounterProperties().\r
65\r
66 @return The current value of the free running performance counter.\r
67\r
68**/\r
69UINT64\r
70EFIAPI\r
71GetPerformanceCounter (\r
72 VOID\r
73 )\r
74{\r
75 ASSERT (FALSE);\r
76 return 0;\r
77}\r
78\r
79/**\r
80 Retrieves the 64-bit frequency in Hz and the range of performance counter\r
81 values.\r
82\r
83 If StartValue is not NULL, then the value that the performance counter starts\r
84 with immediately after is it rolls over is returned in StartValue. If\r
85 EndValue is not NULL, then the value that the performance counter end with\r
86 immediately before it rolls over is returned in EndValue. The 64-bit\r
87 frequency of the performance counter in Hz is always returned. If StartValue\r
88 is less than EndValue, then the performance counter counts up. If StartValue\r
89 is greater than EndValue, then the performance counter counts down. For\r
90 example, a 64-bit free running counter that counts up would have a StartValue\r
91 of 0 and an EndValue of 0xFFFFFFFFFFFFFFFF. A 24-bit free running counter\r
92 that counts down would have a StartValue of 0xFFFFFF and an EndValue of 0.\r
93\r
94 @param StartValue The value the performance counter starts with when it\r
95 rolls over.\r
96 @param EndValue The value that the performance counter ends with before\r
97 it rolls over.\r
98\r
99 @return The frequency in Hz.\r
100\r
101**/\r
102UINT64\r
103EFIAPI\r
104GetPerformanceCounterProperties (\r
105 OUT UINT64 *StartValue, OPTIONAL\r
106 OUT UINT64 *EndValue OPTIONAL\r
107 )\r
108{\r
109 ASSERT (FALSE);\r
110 return 0;\r
111}\r