fork: properly set up child process
Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
parent
ec4e9fc27d
commit
b926d50365
6 changed files with 73 additions and 25 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Reference in a new issue