fork: properly set up child process

Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
Michael Shaw 2026-07-22 00:06:57 -04:00
commit b926d50365
6 changed files with 73 additions and 25 deletions

View file

@ -21,6 +21,12 @@ struct timespec get_realtime()
return ret;
}
time_t unix_time()
{
u64 sec = (rdtsc() - timekeeper.boot_tsc) / timekeeper.tsc_hz;
return timekeeper.boot_unix_seconds + sec;
}
void time_init()
{
timekeeper.tsc_hz = tsc_calibrate();