/dev/clockThe file /dev/clock lets you read and set your system's clock. It is a part of the driver mem, which manages memory; thus, it has major number 0 and minor number 5.
The real time clock occupies the first 14 bytes of nonvolatile RAM (//ddeevv//ccmmooss). The difference between /dev/cmos and /dev/clock is that the latter device locks the circuit during a read, so that the clock will not be updated as it is being read.
/dev/clock limits access to a 14-byte data area. Attempts to read or write beyond this limit will fail. /dev/clock stores the system time in binary-coded decimal (BCD). For details on BCD, see the Lexicon entry for float.
The COHERENT command ATclock reads this device and writes to it.