Lines Matching defs:ats
233 struct timespec ats;
236 error = kern_clock_gettime(td, uap->clock_id, &ats);
238 error = copyout(&ats, uap->tp, sizeof(ats));
244 cputick2timespec(uint64_t runtime, struct timespec *ats)
248 ats->tv_sec = runtime / tr;
249 ats->tv_nsec = ((runtime % tr) * 1000000000ULL) / tr;
253 kern_thread_cputime(struct thread *targettd, struct timespec *ats)
270 cputick2timespec(runtime, ats);
274 kern_process_cputime(struct proc *targetp, struct timespec *ats)
286 cputick2timespec(runtime, ats);
290 get_cputime(struct thread *td, clockid_t clock_id, struct timespec *ats)
304 kern_thread_cputime(td2, ats);
311 kern_process_cputime(p2, ats);
318 kern_clock_gettime(struct thread *td, clockid_t clock_id, struct timespec *ats)
327 nanotime(ats);
330 getnanotime(ats);
338 TIMEVAL_TO_TIMESPEC(&user, ats);
347 TIMEVAL_TO_TIMESPEC(&user, ats);
353 nanouptime(ats);
357 getnanouptime(ats);
360 ats->tv_sec = time_second;
361 ats->tv_nsec = 0;
364 kern_thread_cputime(NULL, ats);
368 kern_process_cputime(p, ats);
374 return (get_cputime(td, clock_id, ats));
389 struct timespec ats;
392 if ((error = copyin(uap->tp, &ats, sizeof(ats))) != 0)
394 return (kern_clock_settime(td, uap->clock_id, &ats));
403 kern_clock_settime(struct thread *td, clockid_t clock_id, struct timespec *ats)
412 if (!timespecvalid_interval(ats))
415 (ats->tv_sec > 8000ULL * 365 * 24 * 60 * 60 ||
416 ats->tv_sec < utc_offset()))
419 TIMESPEC_TO_TIMEVAL(&atv, ats);