Updating time in linux
Updating time in linux - Poop cam chat
The system clock reports seconds and microseconds since a start point, defined to be the POSIX Epoch: 1970-01-01 0000 (UTC).
The enabled flag is used to enable or disable the alarm interrupt, or to read its current status; when using these calls, RTC_AIE_ON and RTC_AIE_OFF are not used.
Read and set the alarm time, for RTCs that support alarms.
The alarm interrupt must be separately enabled or disabled using the RTC_AIE_ON, RTC_AIE_OFF requests.
Sets this RTC's time to the time specified by the rtc_time structure pointed to by the third ioctl(2) argument.
To set the RTC's time the process must be privileged (i.e., have the CAP_SYS_TIME capability).
This is the interface to drivers for real-time clocks (RTCs).
Most computers have one or more hardware clocks which record the current "wall clock" time. One of these usually has battery backup power so that it tracks the time even while the computer is turned off. All i386 PCs, and ACPI-based systems, have an RTC that is compatible with the Motorola MC146818 chip on the original PC/AT.
They usually won't offer the same functionality as the RTC from a PC/AT.
RTC vs system clock RTCs should not be confused with the system clock, which is a software clock maintained by the kernel and used to implement gettimeofday(2) and time(2), as well as setting timestamps on files, etc.
In both cases, the number is interpreted relative to this RTC's Epoch.
The RTC's Epoch is initialized to 1900 on most systems but on Alpha and MIPS it might also be initialized to 1952, 1980, or 2000, depending on the value of an RTC register for the year.
(This file contains the value 64 by default.) Enable or disable the periodic interrupt, for RTCs that support these periodic interrupts. Only a privileged process (i.e., one having the CAP_SYS_RESOURCE capability) can enable the periodic interrupt if the frequency is currently set above the value specified in /proc/sys/dev/rtc/max-user-freq.