us_Timer in TimeStamp_(re)

Tue, 28 Oct 1997 18:04:43 GMT



Peter Gerwinski wrote:

> According to Thomas Tan:
> > Are you guys going to implement us_Timer field of TimeStamps soon?
> 
> If you tell us how to do that in a portable way - at once!  ;-)
> 
> > I need a seed for a random function and this seems to be the best way to go. 
> 
> On 21 September, Frank Heckenbach posted a Unit `Rand' to this list
> which implements a `random' and a `randomize' function just this
> way.

Sorry, but this is probably not the best thing to look at. First of all,
it's not portable (it uses the system time under DJGPP, the process ID on
other systems where available, and doesn't appear to work under EMX).

Then, the unit (and especially the random algorithms and data sizes) are
particularly for compatibility with BP's random generator, nothing else.

So, a portable way to get fractions of a second would be a fine thing
(micro seconds will not always be possible; under Dos, e.g., the
resolution is 1/18.2 seconds, unless you do direct hardware manipulation)...

-- 
Frank Heckenbach, Erlangen, Germany
heckenb@mi.uni-erlangen.de
http://home.pages.de/~fjf/links.htm


Frank Heckenbach (heckenb@mi.uni-erlangen.de)

HTML conversion by Lluís de Yzaguirre i Maura
Institut de Lingüística Aplicada - Universitat "Pompeu Fabra"
e-mail: de_yza@upf.es