[fpc-pascal]RTC with Free Pascal

Lee, John John.Lee at logicacmg.com
Wed Apr 16 19:47:13 CEST 2003

Re clock resolution, why not use eg Thomas Schatzl's cpu unit (or some of
its code) for the timing. 

Regards John

-----Original Message-----
From: Anton Tichawa [mailto:anton.tichawa at chello.at]
Sent: Wednesday, April 16, 2003 19:08
To: fpc-pascal at lists.freepascal.org
Subject: Re: [fpc-pascal]RTC with Free Pascal

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.
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


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


fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org

This e-mail and any attachment is for authorised use by the intended recipient(s) only.  It may contain proprietary material, confidential information and/or be subject to legal privilege.  It should not be copied, disclosed to, retained or used by, any other party.  If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender.  Thank you.

More information about the fpc-pascal mailing list