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