random number generator followup
Mike Matthews
matthews at is-next.umd.edu
Sat Dec 29 13:24:21 AEST 1990
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 at 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
More information about the Comp.unix.programmer
mailing list