Lines Matching refs:now
43 static const char *strtime(const struct timespec *now);
88 struct timespec now; in adjtimex_status() local
93 now.tv_sec = tx->time.tv_sec; in adjtimex_status()
94 now.tv_nsec = tx->time.tv_usec * 1000; in adjtimex_status()
101 tst_resm(TINFO, "%s adjtimex: %s", strtime(&now), msgs[r]); in adjtimex_status()
104 strtime(&now), r); in adjtimex_status()
107 static const char *strtime(const struct timespec *now) in strtime() argument
111 if (snprintf(fmt, sizeof(fmt), "%%F %%T.%09ld %%z", now->tv_nsec) < 0) { in strtime()
115 if (!strftime(buf, sizeof(buf), fmt, localtime(&now->tv_sec))) { in strtime()
124 struct timespec now, target; in test_hrtimer_early_expiration() local
127 clock_gettime(CLOCK_REALTIME, &now); in test_hrtimer_early_expiration()
128 tst_resm(TINFO, "now is %s", strtime(&now)); in test_hrtimer_early_expiration()
130 target = now; in test_hrtimer_early_expiration()
139 clock_gettime(CLOCK_REALTIME, &now); in test_hrtimer_early_expiration()
140 tst_resm(TINFO, "now is %s", strtime(&now)); in test_hrtimer_early_expiration()
142 fail = !in_order(target, now); in test_hrtimer_early_expiration()
150 struct timespec now, leap, start; in run_leapsec() local
153 clock_gettime(CLOCK_REALTIME, &now); in run_leapsec()
154 start = now; in run_leapsec()
155 tst_resm(TINFO, "test start at %s", strtime(&now)); in run_leapsec()
160 now.tv_sec += 86400 - now.tv_sec % 86400; in run_leapsec()
161 now.tv_nsec = 0; in run_leapsec()
162 leap = now; in run_leapsec()
166 now.tv_sec -= SECONDS_BEFORE_LEAP; in run_leapsec()
167 if (clock_settime(CLOCK_REALTIME, &now) < 0) in run_leapsec()
169 tst_resm(TINFO, "setting time to %s", strtime(&now)); in run_leapsec()
190 clock_gettime(CLOCK_REALTIME, &now); in run_leapsec()
191 start.tv_sec += now.tv_sec - (leap.tv_sec - SECONDS_BEFORE_LEAP); in run_leapsec()
192 start.tv_nsec += now.tv_nsec; in run_leapsec()
212 struct timespec now; in cleanup() local
213 clock_gettime(CLOCK_REALTIME, &now); in cleanup()
216 clock_settime(CLOCK_REALTIME, &now); in cleanup()