fix uptime and cycles
This commit is contained in:
parent
98d189a8d1
commit
e1d3ac6abb
|
@ -15,7 +15,7 @@ ulong npc_cycles = 0;
|
|||
ulong _uptime(){
|
||||
ulong low = GetCount(0);
|
||||
unsigned long long high = GetCount(1) + 1;
|
||||
high = (high * 0xffffffff) >> 3;
|
||||
high = high << 29;
|
||||
npc_time = (ulong)high / HZ + ((low / HZ) >> 3);
|
||||
return npc_time;
|
||||
}
|
||||
|
@ -23,7 +23,7 @@ ulong _uptime(){
|
|||
ulong _cycles(){
|
||||
u32 low = GetCount(0);
|
||||
unsigned long long high = GetCount(1) + 1;
|
||||
high = (high * 0xffffffff) >> 3;
|
||||
high = high << 29;
|
||||
npc_cycles = (ulong)high + (low >> 3);
|
||||
return npc_cycles;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue