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

Function kern_settimeofday

freebsd/kern/kern_time.c:696–712  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

694}
695
696int
697kern_settimeofday(struct thread *td, struct timeval *tv, struct timezone *tzp)
698{
699 int error;
700
701 error = priv_check(td, PRIV_SETTIMEOFDAY);
702 if (error)
703 return (error);
704 /* Verify all parameters before changing time. */
705 if (tv) {
706 if (tv->tv_usec < 0 || tv->tv_usec >= 1000000 ||
707 tv->tv_sec < 0)
708 return (EINVAL);
709 error = settime(td, tv);
710 }
711 return (error);
712}
713
714/*
715 * Get value of an interval timer. The process virtual and profiling virtual

Callers 2

linux_settimeofdayFunction · 0.85
sys_settimeofdayFunction · 0.85

Calls 2

settimeFunction · 0.85
priv_checkFunction · 0.70

Tested by

no test coverage detected