A non-functional instance of the Timer Library.\r
\r
Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.<BR>\r
- This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php.\r
-\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+ SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
\r
)\r
{\r
EFI_STATUS Status;\r
- \r
+\r
Status = gBS->LocateProtocol (&gEfiTimerArchProtocolGuid, NULL, (VOID **)&gTimerAp);\r
- if (!EFI_ERROR (Status)) { \r
+ if (!EFI_ERROR (Status)) {\r
Status = gTimerAp->GetTimerPeriod (gTimerAp, &gTimerPeriod);\r
ASSERT_EFI_ERROR (Status);\r
\r
// Convert to Nanoseconds.\r
gTimerPeriod = MultU64x32 (gTimerPeriod, 100);\r
- \r
+\r
if (gTimerEvent == NULL) {\r
Status = gBS->CreateEvent (EVT_TIMER, 0, NULL, NULL, (VOID **)&gTimerEvent);\r
ASSERT_EFI_ERROR (Status);\r
EFI_STATUS Status;\r
UINT64 HundredNanoseconds;\r
UINTN Index;\r
- \r
- if ((gTimerPeriod != 0) && \r
- ((UINT64)NanoSeconds > gTimerPeriod) && \r
+\r
+ if ((gTimerPeriod != 0) &&\r
+ ((UINT64)NanoSeconds > gTimerPeriod) &&\r
(EfiGetCurrentTpl () == TPL_APPLICATION)) {\r
//\r
// This stall is long, so use gBS->WaitForEvent () to yield CPU to DXE Core\r
//\r
- \r
+\r
HundredNanoseconds = DivU64x32 (NanoSeconds, 100);\r
Status = gBS->SetTimer (gTimerEvent, TimerRelative, HundredNanoseconds);\r
ASSERT_EFI_ERROR (Status);\r
\r
Status = gBS->WaitForEvent (sizeof (gTimerEvent)/sizeof (EFI_EVENT), &gTimerEvent, &Index);\r
ASSERT_EFI_ERROR (Status);\r
- \r
+\r
} else {\r
gEmuThunk->Sleep (NanoSeconds);\r
}\r
if (EndValue != NULL) {\r
*EndValue = (UINT64)-1LL;\r
}\r
- \r
+\r
return gEmuThunk->QueryPerformanceFrequency ();\r
}\r
\r