]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EmbeddedPkg/Library/VirtualRealTimeClockLib/VirtualRealTimeClockLib.c
EmbeddedPkg/VirtualRealTimeClockLib: Explicit cast to UINT32
[mirror_edk2.git] / EmbeddedPkg / Library / VirtualRealTimeClockLib / VirtualRealTimeClockLib.c
index 74e72bd48b4c773dc85ad219b158960754a35f3b..5c13ed4cf190327b6eb3d2912fb5e8cabcbb6a27 100644 (file)
@@ -202,14 +202,14 @@ LibGetTime (
   // Because we use the performance counter, we can fill the Nanosecond attribute\r
   // provided that the remainder doesn't overflow 64-bit during multiplication.\r
   if (Remainder <= 18446744073U) {\r
-    Time->Nanosecond = MultU64x64 (Remainder, 1000000000U) / Freq;\r
+    Time->Nanosecond = (UINT32)(MultU64x64 (Remainder, 1000000000U) / Freq);\r
   } else {\r
     DEBUG ((DEBUG_WARN, "LibGetTime: Nanosecond value not set (64-bit overflow).\n"));\r
   }\r
 \r
   if (Capabilities) {\r
     Capabilities->Accuracy   = 0;\r
-    Capabilities->Resolution = Freq;\r
+    Capabilities->Resolution = 1;\r
     Capabilities->SetsToZero = FALSE;\r
   }\r
 \r