CLOCK_REALTIME
#if !defined(CLOCK_REALTIME) && __POSIX_VISIBLE >= 200112
#ifndef CLOCK_REALTIME
if (clock_gettime (CLOCK_REALTIME, &Time) == -1)
(void) clock_gettime(CLOCK_REALTIME, ts);
if (timer_create(CLOCK_REALTIME, &mevp->me_sigev,
if (timer_create(CLOCK_REALTIME, &sig_struct, &t_id) != 0) {
(void) clock_gettime(CLOCK_REALTIME, &event->event_time);
(void) clock_gettime(CLOCK_REALTIME, &event->event_time);
(void) clock_gettime(CLOCK_REALTIME, &now);
(void) clock_gettime(CLOCK_REALTIME, &waitcap);
if (timer_create(CLOCK_REALTIME, &sigev, &ev_obj->timerid) == -1) {
if (timer_create(CLOCK_REALTIME, NULL, &timer) != 0) {
if (timer_create(CLOCK_REALTIME, NULL, &timer) != 0) {
if (clock_gettime(CLOCK_REALTIME, &ts) != 0) {
if (timer_create(CLOCK_REALTIME, &ev, &tid) == -1) {
if (timer_create(CLOCK_REALTIME, &sig_struct, &t_id) != 0) {
if (timer_create(CLOCK_REALTIME, &ev, &tid) == -1)
if (timer_create(CLOCK_REALTIME, &ev, &tid) == -1)
if (timer_create(CLOCK_REALTIME, &ev, &tid) == -1)
(void) clock_gettime(CLOCK_REALTIME, &timeout);
(void) __clock_gettime_sys(CLOCK_REALTIME, (timespec_t *)tv);
if (clock_gettime(CLOCK_REALTIME, &ts[0]) != 0) {
if (clock_gettime(CLOCK_REALTIME, &ts[1]) != 0) {
case CLOCK_REALTIME:
(void) __clock_gettime_sys(CLOCK_REALTIME,
*clock = CLOCK_REALTIME;
return (sem_clockwait(sem, CLOCK_REALTIME, abstime));
return (sem_relclockwait_np(sem, CLOCK_REALTIME, reltime));
abstime_to_reltime(CLOCK_REALTIME, absts, &tslocal);
clock_id = CLOCK_REALTIME;
if (clock_id != CLOCK_REALTIME && clock_id != CLOCK_HIGHRES)
ap->clockid = CLOCK_REALTIME;
(clock_id == CLOCK_REALTIME || clock_id == CLOCK_HIGHRES)) {
case CLOCK_REALTIME:
return (pthread_rwlock_relclockrdlock_np(rwlp, CLOCK_REALTIME,
case CLOCK_REALTIME:
return (pthread_rwlock_clockrdlock(rwlp, CLOCK_REALTIME, abstime));
case CLOCK_REALTIME:
return (pthread_rwlock_relclockwrlock_np(rwlp, CLOCK_REALTIME,
case CLOCK_REALTIME:
return (pthread_rwlock_clockwrlock(rwlp, CLOCK_REALTIME, abstime));
case CLOCK_REALTIME:
if (error == 0 && clock_id == CLOCK_REALTIME &&
case CLOCK_REALTIME:
case CLOCK_REALTIME:
return (sema_relclockwait(sp, CLOCK_REALTIME, reltime));
return (sema_clockwait(sp, CLOCK_REALTIME, abstime));
case CLOCK_REALTIME:
return (pthread_mutex_clocklock(mp, CLOCK_REALTIME, abstime));
case CLOCK_REALTIME:
return (pthread_mutex_relclocklock_np(mp, CLOCK_REALTIME, reltime));
if (clock_id != CLOCK_REALTIME && clock_id != CLOCK_HIGHRES)
clock_id = CLOCK_REALTIME;
if (cvp->cond_clockid != CLOCK_REALTIME &&
return (CLOCK_REALTIME);
case CLOCK_REALTIME:
case CLOCK_REALTIME:
err = timer_create(CLOCK_REALTIME, &sev, &tid);
#ifdef CLOCK_REALTIME
int m = CLOCK_REALTIME;
#ifdef CLOCK_REALTIME
if (clock_gettime(CLOCK_REALTIME, &tsnow) == 0)
if (clock_gettime(CLOCK_REALTIME, &tspec) != 0)
if (clock_gettime(CLOCK_REALTIME, &tspec) != 0)
if (clock_gettime(CLOCK_REALTIME, &tspec) != 0)
if (clock_gettime(CLOCK_REALTIME, &tspec) != 0)
if (clock_gettime(CLOCK_REALTIME, &tspec) != 0)
clock_rel_to_abs(CLOCK_REALTIME, &clock_to_100ms, &to);
elapse = clock_abs_after(CLOCK_REALTIME, &to);
clock_rel_to_abs(CLOCK_REALTIME, &clock_to_100ms, &to);
p = pthread_cond_clockwait(&cc->cc_cond, &cc->cc_mutex, CLOCK_REALTIME,
elapse = clock_abs_after(CLOCK_REALTIME, &to);
if (clock_gettime(CLOCK_REALTIME, &start) != 0) {
err(EXIT_FAILURE, "failed to read clock %d", CLOCK_REALTIME);
elapse = clock_rel_after(CLOCK_REALTIME, &start, &clock_to_100ms);
if (clock_gettime(CLOCK_REALTIME, &start) != 0) {
err(EXIT_FAILURE, "failed to read clock %d", CLOCK_REALTIME);
CLOCK_REALTIME, &clock_to_100ms);
elapse = clock_rel_after(CLOCK_REALTIME, &start, &clock_to_100ms);
clock_rel_to_abs(CLOCK_REALTIME, &clock_to_100ms, &to);
elapse = clock_abs_after(CLOCK_REALTIME, &to);
clock_rel_to_abs(CLOCK_REALTIME, &clock_to_100ms, &to);
p = pthread_mutex_clocklock(mutex, CLOCK_REALTIME, &to);
elapse = clock_abs_after(CLOCK_REALTIME, &to);
if (clock_gettime(CLOCK_REALTIME, &start) != 0) {
err(EXIT_FAILURE, "failed to read clock %d", CLOCK_REALTIME);
elapse = clock_rel_after(CLOCK_REALTIME, &start, &clock_to_100ms);
if (clock_gettime(CLOCK_REALTIME, &start) != 0) {
err(EXIT_FAILURE, "failed to read clock %d", CLOCK_REALTIME);
p = pthread_mutex_relclocklock_np(mutex, CLOCK_REALTIME,
elapse = clock_rel_after(CLOCK_REALTIME, &start, &clock_to_100ms);
clock_rel_to_abs(CLOCK_REALTIME, &clock_to_100ms, &to);
elapse = clock_abs_after(CLOCK_REALTIME, &to);
clock_rel_to_abs(CLOCK_REALTIME, &clock_to_100ms, &to);
p = pthread_rwlock_clockrdlock(rwl, CLOCK_REALTIME, &to);
elapse = clock_abs_after(CLOCK_REALTIME, &to);
clock_rel_to_abs(CLOCK_REALTIME, &clock_to_100ms, &to);
elapse = clock_abs_after(CLOCK_REALTIME, &to);
clock_rel_to_abs(CLOCK_REALTIME, &clock_to_100ms, &to);
p = pthread_rwlock_clockwrlock(rwl, CLOCK_REALTIME, &to);
elapse = clock_abs_after(CLOCK_REALTIME, &to);
if (clock_gettime(CLOCK_REALTIME, &start) != 0) {
err(EXIT_FAILURE, "failed to read clock %d", CLOCK_REALTIME);
elapse = clock_rel_after(CLOCK_REALTIME, &start, &clock_to_100ms);
if (clock_gettime(CLOCK_REALTIME, &start) != 0) {
err(EXIT_FAILURE, "failed to read clock %d", CLOCK_REALTIME);
p = pthread_rwlock_relclockrdlock_np(rwl, CLOCK_REALTIME,
elapse = clock_rel_after(CLOCK_REALTIME, &start, &clock_to_100ms);
if (clock_gettime(CLOCK_REALTIME, &start) != 0) {
err(EXIT_FAILURE, "failed to read clock %d", CLOCK_REALTIME);
elapse = clock_rel_after(CLOCK_REALTIME, &start, &clock_to_100ms);
if (clock_gettime(CLOCK_REALTIME, &start) != 0) {
err(EXIT_FAILURE, "failed to read clock %d", CLOCK_REALTIME);
p = pthread_rwlock_relclockwrlock_np(rwl, CLOCK_REALTIME,
elapse = clock_rel_after(CLOCK_REALTIME, &start, &clock_to_100ms);
clock_rel_to_abs(CLOCK_REALTIME, &clock_to_100ms, &to);
elapse = clock_abs_after(CLOCK_REALTIME, &to);
clock_rel_to_abs(CLOCK_REALTIME, &clock_to_100ms, &to);
p = sem_clockwait(sem, CLOCK_REALTIME, &to);
elapse = clock_abs_after(CLOCK_REALTIME, &to);
if (clock_gettime(CLOCK_REALTIME, &start) != 0) {
err(EXIT_FAILURE, "failed to read clock %d", CLOCK_REALTIME);
elapse = clock_rel_after(CLOCK_REALTIME, &start, &clock_to_100ms);
if (clock_gettime(CLOCK_REALTIME, &start) != 0) {
err(EXIT_FAILURE, "failed to read clock %d", CLOCK_REALTIME);
p = sem_relclockwait_np(sem, CLOCK_REALTIME,
elapse = clock_rel_after(CLOCK_REALTIME, &start, &clock_to_100ms);
{ TIME_UTC, CLOCK_REALTIME, "real time clock" },
{ TIME_UTC, CLOCK_REALTIME, "real time clock" },
VERIFY0(clock_gettime(CLOCK_REALTIME, &now));
clock_add_backend(CLOCK_REALTIME, &clock_realtime);