home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / comp / unix / question / 15375 < prev    next >
Encoding:
Text File  |  1993-01-09  |  785 b   |  29 lines

  1. Newsgroups: comp.unix.questions
  2. Path: sparky!uunet!munnari.oz.au!metro!socs.uts.edu.au!syzygy!jwwondra
  3. From: jwwondra@socs.uts.edu.au (James Wondrasek)
  4. Subject: A: Good seed for drand
  5. Message-ID: <jwwondra.726595091@syzygy>
  6. Sender: news@socs.uts.edu.au
  7. Reply-To: jwwondra@socs.uts.edu.au
  8. Organization: University of Technology, Sydney
  9. Date:  9 Jan 93 15:58:11 GMT
  10. Lines: 17
  11.  
  12. From now on I will put my faith in grep and not my own eyes...
  13.  
  14. The answer is use time() which returns type time_t which turns out to
  15. be a typedef for a long...this is present in stdtypes.h which I didn't look
  16. in.
  17.  
  18. You could use it like this:
  19.  
  20.     srand48( (long) time( (a_time_t_ptr) ) )
  21.  
  22.  
  23. James Wondrasek
  24.  
  25. PS Thanks to everyone who emailed me their answers and their man pages :-)
  26.  
  27. jwwondra@socs.uts.edu.au
  28.  
  29.