Path: news.cs.au.dk!not-for-mail From: "Jorgen Lindskov Knudsen" Newsgroups: comp.lang.beta Subject: Re: Hundredth part of a second? Date: Thu, 10 Jun 1999 11:52:27 +0200 Organization: University of Aarhus, Department of Computer Science (DAIMI) Lines: 72 Message-ID: <7jo1sr$46o8e$1@xinwen.cs.au.dk> References: <19990610073922.20741.qmail@noatun.mjolner.dk> <375F80B8.AC772517@studserver.uni-dortmund.de> NNTP-Posting-Host: corona.cs.au.dk X-Trace: xinwen.cs.au.dk 929008347 4415758 255.255.255.255 (10 Jun 1999 09:52:27 GMT) X-Complaints-To: news@cs.au.dk NNTP-Posting-Date: 10 Jun 1999 09:52:27 GMT X-Newsreader: Microsoft Outlook Express 4.72.3110.5 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3110.3 Xref: news.cs.au.dk comp.lang.beta:11993 You should be able to use the preciseTime, as defined in sysutils/time Regards, Jørgen Lindskov Knudsen Daniel Bolege wrote in message <375F80B8.AC772517@studserver.uni-dortmund.de>... >Sascha Kimmel wrote: > >> >> Hi! >> >> What do you want to do with this hundreth second? What exactly do you >> want to get? Set the time, read the time or wait a hundreth second? >> Interestingly, cycle has time as real: > >... > >We would like to init the beta random generator "inguin". Inguin >exits always the same values. We wrote an init pattern that ignores >some values. The number of the first values to be ignored is >generated using the time pattern. Look: > >(# > > zufallInit: (# > > temp: @Integer; > n: @Integer; > jetzt: @Time; > do > timeNow -> jetzt; > > > jetzt.day * 24 * 60 * 60 + > jetzt.hour * 60 * 60 + > jetzt.minute * 60 + > jetzt.sec -> n; > > (for z: n repeat > (0, 1) -> &ignuin -> temp > for); > > #); (* zufallInit *) > >do > > > (* example *) > zufallInit; > > (for z:165 repeat > (1, 165) -> &ignuin -> putInt; ' ' -> put; > for); > newLine; > >#) > >But: If you need a sequence (e.g. 165 numbers) of random values, you >cannot >call the init routine within - here - 165 seconds without getting >an equal sequence. > >So, we need a smaller unit than a second. We do not want the system to >go to sleep. > >Regards >Daniel