avoid integer division in nano_count on windows

db4
Doug Coleman 2009-12-28 09:56:10 -06:00
parent 7fa3b71c07
commit 964dbfe72d
1 changed files with 1 additions and 1 deletions

View File

@ -57,7 +57,7 @@ u64 nano_count()
hi += 1;
lo = count.LowPart;
return (((u64)hi << 32) | (u64)lo)*(1000000000/frequency.QuadPart);
return (u64)(((u64)hi << 32) | (u64)lo)*(1000000000.0/frequency.QuadPart);
}
void sleep_nanos(u64 nsec)