time_namespaces(7) Miscellaneous Information Manual time_namespaces(7) time_namespaces - : o CLOCK_MONOTONIC ( CLOCK_MONOTONIC_COARSE CLOCK_MONOTONIC_RAW) -- POSIX-- " ". o CLOCK_BOOTTIME ( CLOCK_BOOTTIME_ALARM) CLOCK_MONOTONIC . . : clock_gettime(2) clock_nanosleep(2) nanosleep(2) timer_settime(2) timerfd_settime(2) /proc/uptime. unshare(2) CLONE_NEWTIME. . . ( ) . /proc/pid/ns/time_for_children . ( setns(2) .) /proc/pid/timens_offsets . /proc/pid/timens_offsets. : - . monotonic CLOCK_MONOTONIC boottime CLOCK_BOOTTIME. ( ) . . - - . timens_offsets : $ cat /proc/self/timens_offsets monotonic 0 0 boottime 0 0 timens_offsets. write(2) EACCES. timens_offsets CAP_SYS_TIME . timens_offsets : EINVAL - 999,999,999. EINVAL - . EPERM CAP_SYS_TIME. ERANGE - . o - o - KTIME_SEC_MAX ( 146 ). unshare(2) timens_offsets . CONFIG_TIME_NS. CLOCK_REALTIME. . - /proc/pid/timens_offsets 1 monotonic 7 boottime. . /. . inode : $ readlink /proc/$$/ns/time time:[4026531834] uptime(1) clock_times clock_getres(2) : $ uptime --pretty up 21 hours, 17 minutes $ ./clock_times CLOCK_REALTIME : 1585989401.971 (18356 days + 8h 36m 41s) CLOCK_TAI : 1585989438.972 (18356 days + 8h 37m 18s) CLOCK_MONOTONIC: 56338.247 (15h 38m 58s) CLOCK_BOOTTIME : 76633.544 (21h 17m 13s) unshare(1) bash(1). echo timens_offsets CLOCK_MONOTONIC CLOCK_BOOTTIME 7 : $ PS1=ns2# sudo unshare -T -- bash --norc ns2# echo monotonic$((2*24*60*60))0">/proc/$$/timens_offsets" ns2# echo boottime$((7*24*60*60))0">/proc/$$/timens_offsets" bash(1) --norc . timens_offsets. cat(1) timens_offsets. cat(1) timens_offsets . ns2# cat /proc/$$/timens_offsets monotonic 172800 0 boottime 604800 0 ns2# echo "boottime $((9*24*60*60)) 0" > /proc/$$/timens_offsets bash: echo: write error: Permission denied uptime(1) clock_times: ns2# uptime --pretty up 1 week, 21 hours, 18 minutes ns2# ./clock_times CLOCK_REALTIME : 1585989457.056 (18356 days + 8h 37m 37s) CLOCK_TAI : 1585989494.057 (18356 days + 8h 38m 14s) CLOCK_MONOTONIC: 229193.332 (2 days + 15h 39m 53s) CLOCK_BOOTTIME : 681488.629 (7 days + 21h 18m 8s) monotonic boot-time . /proc/pid/ns/time /proc/pid/ns/time_for_children . ns2# readlink /proc/$$/ns/time time:[4026531834] ns2# readlink /proc/$$/ns/time_for_children time:[4026532900] ns2# readlink /proc/self/ns/time # Creates a child process time:[4026532900] monotonic boot-time timens_offsets : $ uptime --pretty up 21 hours, 19 minutes $ ./clock_times CLOCK_REALTIME : 1585989401.971 (18356 days + 8h 38m 51s) CLOCK_TAI : 1585989438.972 (18356 days + 8h 39m 28s) CLOCK_MONOTONIC: 56338.247 (15h 41m 8s) CLOCK_BOOTTIME : 76633.544 (21h 19m 23s) nsenter(1), unshare(1), clock_settime(2), setns(2), unshare(2), namespaces(7), time(7) 3 . . : . 6.18 8 2026 time_namespaces(7)