1
2CLOCK_GETRES(2)            Linux Programmer's Manual           CLOCK_GETRES(2)
3
4
5

NAME

7       clock_getres - Get the resolution of any clock
8

SYNOPSIS

10       long sys_clock_getres (clockid_t which_clock, struct timespec *tp);
11
12

DESCRIPTION

14       clock_gettime  gets  the  resolution  of  any  clock  specified  by the
15       which_clock parameter, and places this information in the struct  time‐
16       spec pointed to by tp. The values that clockid_t currently supports for
17       POSIX.1b timers, as defined in include/linux/time.h, are:
18
19
20       CLOCK_REALTIME
21              Systemwide realtime clock.
22
23
24       CLOCK_MONOTONIC
25              Represents monotonic time. Cannot be set.
26
27
28       CLOCK_PROCESS_CPUTIME_ID
29              High resolution per-process timer.
30
31
32       CLOCK_THREAD_CPUTIME_ID
33              Thread-specific timer.
34
35
36       CLOCK_REALTIME_HR
37              High resolution version of CLOCK_REALTIME.
38
39
40       CLOCK_MONOTONIC_HR
41              High resolution version of CLOCK_MONOTONIC.
42
43
44

RETURN VALUE

46       clock_gettime returns 0 on success; otherwise, it returns  one  of  the
47       errors listed in the "Errors" section.
48
49

ERRORS

51       -EINVAL
52              An invalid which_clock value was specified.
53
54
55       -EFAULT
56              An invalid tp value was specified.
57
58

SEE ALSO

60       clock_gettext(2), clock_nanosleep(2), clock_settime(2)
61
62

AUTHOR

64       Niki Rahimi
65
66
67
68
69Linux 2.6                         2004-03-12                   CLOCK_GETRES(2)
Impressum