Lines Matching defs:ats
234 struct timespec ats;
237 error = kern_clock_gettime(td, uap->clock_id, &ats);
239 error = copyout(&ats, uap->tp, sizeof(ats));
245 cputick2timespec(uint64_t runtime, struct timespec *ats)
248 ats->tv_sec = runtime / 1000000;
249 ats->tv_nsec = runtime % 1000000 * 1000;
253 get_thread_cputime(struct thread *targettd, struct timespec *ats)
269 cputick2timespec(runtime, ats);
273 get_process_cputime(struct proc *targetp, struct timespec *ats)
284 cputick2timespec(runtime, ats);
288 get_cputime(struct thread *td, clockid_t clock_id, struct timespec *ats)
302 get_thread_cputime(td2, ats);
309 get_process_cputime(p2, ats);
316 kern_clock_gettime(struct thread *td, clockid_t clock_id, struct timespec *ats)
325 nanotime(ats);
328 getnanotime(ats);
336 TIMEVAL_TO_TIMESPEC(&user, ats);
345 TIMEVAL_TO_TIMESPEC(&user, ats);
351 nanouptime(ats);
355 getnanouptime(ats);
358 ats->tv_sec = time_second;
359 ats->tv_nsec = 0;
362 get_thread_cputime(NULL, ats);
366 get_process_cputime(p, ats);
372 return (get_cputime(td, clock_id, ats));
387 struct timespec ats;
390 if ((error = copyin(uap->tp, &ats, sizeof(ats))) != 0)
392 return (kern_clock_settime(td, uap->clock_id, &ats));
396 kern_clock_settime(struct thread *td, clockid_t clock_id, struct timespec *ats)
405 if (ats->tv_nsec < 0 || ats->tv_nsec >= 1000000000 ||
406 ats->tv_sec < 0)
409 TIMESPEC_TO_TIMEVAL(&atv, ats);