Changeset 53474 in vbox
- Timestamp:
- Dec 6, 2014 4:17:43 AM (10 years ago)
- svn:sync-xref-src-repo-rev:
- 97204
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/Support/SUPDrv.c
r53473 r53474 55 55 # include <iprt/path.h> 56 56 #endif 57 /*#include <iprt/uint128.h> - probably needs exporting. */ 57 58 #include <iprt/x86.h> 58 59 … … 6171 6172 { 6172 6173 /* Try not to lose precision, the larger the interval the more likely we overflow. */ 6174 #if 0 /** @todo r=bird: What about falling back on iprt/uint128.h here instead of 6175 * trading accuracy for values that works with ASMMultU64ByU32DivByU32? Speed 6176 * is hardly an issue at this point. */ 6177 RTUINT128U CpuHz, Tmp, Divisor; 6178 RTUInt128MulU64ByU64(&Tmp, u64DeltaTsc, RT_NS_1SEC); 6179 RTUInt128Div(&CpuHz, &Tmp, RTUInt128AssignU64(&Divisor, u64DeltaNanoTS)); 6180 pGip->u64CpuHz = CpuHz.s.Lo; 6181 #else 6173 6182 if ( u64DeltaTsc < UINT64_MAX / RT_NS_100MS 6174 6183 && u64DeltaNanoTS / 10 < UINT32_MAX) … … 6182 6191 else /* Screw it. */ 6183 6192 pGip->u64CpuHz = u64DeltaTsc / (u64DeltaNanoTS / RT_NS_1SEC_64); 6193 #endif 6184 6194 } 6185 6195
Note:
See TracChangeset
for help on using the changeset viewer.