]>
Commit | Line | Data |
---|---|---|
e1f414b6 | 1 | /** @file\r |
2 | A non-functional instance of the Timer Library.\r | |
3 | \r | |
b9610b9c | 4 | Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.<BR>\r |
19388d29 | 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 | |
2fc59a00 | 8 | http://opensource.org/licenses/bsd-license.php.\r |
e1f414b6 | 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 | |
29 | UINTN\r | |
30 | EFIAPI\r | |
31 | MicroSecondDelay (\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 | |
49 | UINTN\r | |
50 | EFIAPI\r | |
51 | NanoSecondDelay (\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 | |
70 | UINT64\r | |
71 | EFIAPI\r | |
72 | GetPerformanceCounter (\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 | |
103 | UINT64\r | |
104 | EFIAPI\r | |
105 | GetPerformanceCounterProperties (\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 |
b9610b9c | 114 | \r |
115 | /**\r | |
116 | Converts elapsed ticks of performance counter to time in nanoseconds.\r | |
117 | \r | |
118 | This function converts the elapsed ticks of running performance counter to\r | |
119 | time value in unit of nanoseconds.\r | |
120 | \r | |
121 | @param Ticks The number of elapsed ticks of running performance counter.\r | |
122 | \r | |
123 | @return The elapsed time in nanoseconds.\r | |
124 | \r | |
125 | **/\r | |
126 | UINT64\r | |
127 | EFIAPI\r | |
128 | GetTimeInNanoSecond (\r | |
129 | IN UINT64 Ticks\r | |
130 | )\r | |
131 | {\r | |
132 | ASSERT (FALSE);\r | |
133 | return 0;\r | |
134 | }\r |