[fpc-pascal]RTC with Free Pascal

Anton Tichawa anton.tichawa at chello.at
Wed Apr 16 20:07:32 CEST 2003

Hello, Crhistophe!

> Hello
> I'd like to use RTC (Real Time Clock) with FPC under Linux.
> Is it possible ?
> I found a file named rtc.txt in the Documentation directory of the
> Kernel source (/usr/linux/Documentation). There is a simple C example.
> Is it possible to write this kind of things in Pascal ?

I didn't find rtc.txt on my local hard disk, but I have written a unit, 
times.pas, that does real-time stuff, using linux system calls.

It implements real time stamps and a sceleton timer interrupt handler. That 
allows profiling, multi-tasking and other intelligent behaviour. Not 
understanding the linux documentation, I have to use monitor protection. Then 
there's day times, leap years, (currently only) gregorian date-to-integer 
mapping with ISO conforming date strings.

Shall I post the file(s) to the list or to your email address, Christophe?

A serious question: The resolution on linux is still as high as 10 ms. Can 
any one tell me where to change that big, big constant to e. g. 10 ns, 
because also cpus were slower by a factor of 1e6 when these 10 ms were chosen.


Anton Tichawa.


"Adas Methode war, wie sich zeigen wird, Tagträume in offenbar korrekte 
Berechnungen einzuweben."

Doris Langley Moore: Ada, Countess of Lovelace (London 1977).


Ing. Anton Tichawa
Volkertstrasse 19 / 20
A-1020 Wien
phone: +43 1 218 97 59
mobil: +43 664 52 07 907; currently n/a
email: anton.tichawa at chello.at


More information about the fpc-pascal mailing list