Changeset 20131 in vbox
- Timestamp:
- May 28, 2009 6:55:10 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/src/VBox/Devices/PC/DevPit-i8254.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/PC/DevPit-i8254.cpp
r20087 r20131 182 182 return s->count - (d % s->count); /** @todo check this value. */ 183 183 } 184 uint64_t Interval = s->u64NextTS - s->u64ReloadTS; 185 if (!Interval) 186 return s->count - 1; /** @todo This is WRONG! But I'm too tired to fix it properly and just want to shut up a DIV/0 trap now. */ 184 187 d = TMTimerGet(pTimer); 185 d = ASMMultU64ByU32DivByU32(d - s->u64ReloadTS, s->count, s->u64NextTS - s->u64ReloadTS);188 d = ASMMultU64ByU32DivByU32(d - s->u64ReloadTS, s->count, Interval); 186 189 if (d >= s->count) 187 190 return 1; 188 return s->count - d;191 return s->count - d; 189 192 } 190 193 d = ASMMultU64ByU32DivByU32(TMTimerGet(pTimer) - s->count_load_time, PIT_FREQ, TMTimerGetFreq(pTimer));
Note:
See TracChangeset
for help on using the changeset viewer.

