Fix bug in KTime_GetEpochNS()

This commit is contained in:
Ali Mashtizadeh 2015-01-16 15:16:44 -08:00
parent 2342aefe9e
commit a01b839b67
2 changed files with 1 additions and 3 deletions

View File

@ -20,8 +20,6 @@ time(time_t *t)
uint64_t nsec = OSTime();
time_t sec = nsec / 1000000000;
printf("%ld\n", nsec);
if (t)
*t = sec;

View File

@ -194,7 +194,7 @@ KTime_GetEpochNS()
Spinlock_Lock(&ktimeLock);
tscDiff = Time_GetTSC() - ktimeLastTSC;
epoch = ktimeLastEpoch * 1000000000 + tscDiff * 1000000000 / ticksPerSecond;
epoch = (ktimeLastEpoch * 1000000000) + (tscDiff * 1000000000 / ticksPerSecond);
Spinlock_Unlock(&ktimeLock);
return epoch;