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

Function sysctl_kern_boottime

freebsd/kern/kern_tc.c:151–171  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149void dtrace_getnanouptime(struct timespec *tsp);
150
151static int
152sysctl_kern_boottime(SYSCTL_HANDLER_ARGS)
153{
154 struct timeval boottime;
155
156 getboottime(&boottime);
157
158/* i386 is the only arch which uses a 32bits time_t */
159#ifdef __amd64__
160#ifdef SCTL_MASK32
161 int tv[2];
162
163 if (req->flags & SCTL_MASK32) {
164 tv[0] = boottime.tv_sec;
165 tv[1] = boottime.tv_usec;
166 return (SYSCTL_OUT(req, tv, sizeof(tv)));
167 }
168#endif
169#endif
170 return (SYSCTL_OUT(req, &boottime, sizeof(boottime)));
171}
172
173static int
174sysctl_kern_timecounter_get(SYSCTL_HANDLER_ARGS)

Callers

nothing calls this directly

Calls 1

getboottimeFunction · 0.85

Tested by

no test coverage detected