MCPcopy Create free account
hub / github.com/F-Stack/f-stack / linux_gettimeofday

Function linux_gettimeofday

freebsd/amd64/linux32/linux32_machdep.c:603–623  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

601}
602
603int
604linux_gettimeofday(struct thread *td, struct linux_gettimeofday_args *uap)
605{
606 struct timeval atv;
607 l_timeval atv32;
608 struct timezone rtz;
609 int error = 0;
610
611 if (uap->tp) {
612 microtime(&atv);
613 atv32.tv_sec = atv.tv_sec;
614 atv32.tv_usec = atv.tv_usec;
615 error = copyout(&atv32, uap->tp, sizeof(atv32));
616 }
617 if (error == 0 && uap->tzp != NULL) {
618 rtz.tz_minuteswest = 0;
619 rtz.tz_dsttime = 0;
620 error = copyout(&rtz, uap->tzp, sizeof(rtz));
621 }
622 return (error);
623}
624
625int
626linux_settimeofday(struct thread *td, struct linux_settimeofday_args *uap)

Callers

nothing calls this directly

Calls 2

microtimeFunction · 0.85
copyoutFunction · 0.50

Tested by

no test coverage detected