2 * This file is part of time strace test.
4 * Copyright (c) 2015-2016 Dmitry V. Levin <ldv@altlinux.org>
5 * Copyright (c) 2015-2018 The strace developers.
8 * SPDX-License-Identifier: GPL-2.0-or-later
12 #include <asm/unistd.h>
24 TAIL_ALLOC_OBJECT_CONST_PTR(time_t, p);
26 time_t t = syscall(__NR_time, NULL);
28 perror_msg_and_skip("time");
29 printf("time(NULL) = %lld (", (long long) t);
30 print_time_t_nsec(t, 0, 0);
33 t = syscall(__NR_time, p + 1);
34 printf("time(%p) = %s\n", p + 1, sprintrc(t));
36 t = syscall(__NR_time, p);
37 printf("time([%lld", (long long) *p);
38 print_time_t_nsec((time_t) *p, 0, 1),
39 printf("]) = %lld (", (long long) t);
40 print_time_t_nsec(t, 0, 0);
43 puts("+++ exited with 0 +++");
49 SKIP_MAIN_UNDEFINED("__NR_time")