Xref: utzoo comp.unix.programmer:760 comp.sys.next:11086 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!udel!haven!umd5!is-next.umd.edu!matthews From: matthews@is-next.umd.edu (Mike Matthews) Newsgroups: comp.unix.programmer,comp.sys.next Subject: random number generator followup Message-ID: <7782@umd5.umd.edu> Date: 29 Dec 90 02:24:21 GMT Sender: news@umd5.umd.edu Organization: Comp. Sci. Ctr., Univ. of MD, College Park, MD 20742 Lines: 17 Originator: matthews@is-next.umd.edu Wow! Talk about fast NetService! The answer was, of course, obvious. Dave Fetrow suggested I use the pid of the process to seed the number generator, and terry@cogsci.indiana.edu added a gettimefday call (which I haven't gotten to work yet, but it's a neato idea). I have the crontab.local file run my script every minute now, and I haven't heard a repeat yet. It isn't truly random, with only using the pid as the seed; it's a series, sort of -- the numbers increment by five in this case, wrapping around of course. This is fine with me, since the total number of sounds I have for this cause (ahem) is not a multiple of five. If any NeXT user is interested in the stuff, I'll Email the code to them. I'm sure my office mates will kill me, too... :-> Mike