1
2CLOCK_SETTIME(2)                                              CLOCK_SETTIME(2)
3
4
5

NAME

7       clock_settime - Set the specified clock
8

SYNOPSIS

10       long sys_clock_settime (clockid_t which_clock,
11                               const struct timespec *tp);
12
13

DESCRIPTION

15       clock_settime sets the specified clock, which_clock, to the value spec‐
16       ified  by tp. The values that clockid_t currently supports for POSIX.1b
17       timers, 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              Can not copy tp value to kernel space.
57
58

SEE ALSO

60       clock_getres(2), clock_nanosleep(2), clock_gettime(2)
61
62

AUTHOR

64       Niki Rahimi
65
66
67
68                                                              CLOCK_SETTIME(2)
Impressum