First computer with real-time clock?

From: Vassilis Prevelakis <>
Date: Sun Aug 1 22:25:23 2004

Sellam Ismail ( wrote:
> Does anyone know what was the first computer to have a built-in real-time
> clock?

I take it you mean non-volatile clock like the M48T02 RTC chips on the early
SUN-4 machines.

The reason why there is a difference, is that most operating systems
(esp. those that have preemptive schedulers) need a regular timer
interrupt. So they use that interrupt for their time-of-day clock. This
method is generally accurate and convenient since mainframes were not
likely to be switched off overnight.

Another advantage held by the early mainframes is that they were kept
in a stable environment, which meant that their clock keeping was pretty
good anyway.

The other reason why you don't actually want to read a time of day
clock while the OS is running is speed. Why waste time on I/O since the
OS can just keep the elapsed time variable updated with a single

UNIX is a good example: when you boot, the OS goes to the RTC, reads
the current time and date and converts it to the UNIX time (seconds
since 00:00 Jan 1 1970 UTC). From that moment onwards, the OS is making
sure that this value is updated so that it is current. When you
actually ask for the time, the system (actually the C library) converts
the contents of its time-of-day memory location into the calendar date
that humans like to see. When you actually want to set the correct
time, the system will update its internal time-of-day memory location
*and* the RTC so that then next time the system boots, it will have the
correct time.

BTW, the original PCs did not have a non-volatile clock, which is why MSDOS
by default asks for the date and time every time you boot (assuming you
do not override it by creating a AUTOEXEC.BAT file).

Since many people mentioned various HP calculators and computers with
non-volatile clocks, I only want to mention the HP 59309A HP-IB Digital
Clock. This is an HP-IB device that returns the current time/date as
an ASCII string. SO if your computer did not have a non-volatile clock
you could easily add one.

Received on Sun Aug 01 2004 - 22:25:23 BST

This archive was generated by hypermail 2.3.0 : Fri Oct 10 2014 - 23:36:32 BST