diff --git a/lib/libc/time.c b/lib/libc/time.c index aa17c38..db97342 100644 --- a/lib/libc/time.c +++ b/lib/libc/time.c @@ -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; diff --git a/sys/kern/ktime.c b/sys/kern/ktime.c index f997c0e..41fc445 100644 --- a/sys/kern/ktime.c +++ b/sys/kern/ktime.c @@ -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;