home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!cs.utexas.edu!torn!maccs!rickan
- From: rickan@maccs.dcss.mcmaster.ca (Mark Rickan)
- Subject: Re: Initializing Random Seeds
- Message-ID: <1992Sep5.165949.19916@maccs.dcss.mcmaster.ca>
- Organization: Department of Computer Science, McMaster University
- Date: Sat, 5 Sep 1992 16:59:49 GMT
- Lines: 23
-
- In article <hawkeye.715690233@glia> hawkeye@glia.biostr.washington.edu
- (Ken Keys - TF Dude) writes:
-
- >One commonly used seed on UNIX systems is time(NULL) + getpid().
- >By the way, why do you feel the need to seed the generator more than once?
-
- I'm actually running the process on demand, which makes it necessary
- to introduce a new random seed. Unfortunately, there is a remote possibility
- that the user could keep up the system on a fast machine (this is more
- for 'dummy-proofing' than accuracy). The program will ultimately be
- system-specific and GUI-based (you'd have to have pretty fast reflexes!),
- so I may simply determine the process ID or time in milliseconds for
- added assurance.
-
- Cheers,
-
- Mark
-
- --
- -------------------------------------------------------------------------
- = Mark Rickan ...!uunet!utai!utgpu!maccs!rickan =
- = DCSS, McMaster University rickan@maccs.dcss.mcmaster.ca =
- -------------------------------------------------------------------------
-