.TH clock "" "" "Device Driver"
.PC "Read the system clock"
.B /dev/clock
.PP
.II /dev/clock
.II "kernel^system clock"
.II "driver^system clock"
.II "device driver^system clock"
The file
.B /dev/clock
lets you read and set your system's clock.
It is a part of the driver
.BR mem ,
which manages memory; thus, it has major number 0 and minor number 5.
.PP
The real time clock occupies the first 14 bytes of
nonvolatile RAM (\fB/dev/cmos\fR).
The difference between
.B /dev/cmos
and
.B /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.
.PP
.B /dev/clock
limits access to a 14-byte data area.
Attempts to read or write beyond this limit will fail.
.II BCD
.B /dev/clock
stores the system time in binary-coded decimal (BCD).
For details on BCD, see the Lexicon entry for
.BR float .
.PP
.II ATclock
The \*(CO command
.B ATclock
reads this device and writes to it.
.SH "See Also"
.Xr "ATclock," atclock
.Xr "cmos," cmos
.Xr "device drivers," device_dr
.Xr "float" float
