Path: news.cs.au.dk!news.net.uni-c.dk!sunsite.auc.dk!newsfeed1.uni2.dk!newsfeed.tli.de!do.de.uu.net!news-koe1.dfn.de!news.uni-dortmund.de!Informatik.Uni-Dortmund.DE!news From: Daniel Bolege Newsgroups: comp.lang.beta Subject: Re: Hundredth part of a second? Date: Thu, 10 Jun 1999 11:09:12 +0200 Organization: Universitaet Dortmund, Germany Lines: 61 Message-ID: <375F80B8.AC772517@studserver.uni-dortmund.de> References: <19990610073922.20741.qmail@noatun.mjolner.dk> NNTP-Posting-Host: napoli3.cs.uni-dortmund.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 4.05 [en] (X11; I; SunOS 5.6 sun4m) To: Sascha Kimmel Xref: news.cs.au.dk comp.lang.beta:11991 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