Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" To: "Darryl Matthews" , djgpp AT delorie DOT com From: Nate Eldredge Subject: Re: Atanpi Date: Tue, 26 May 1998 18:00:30 -0700 Message-ID: <19980527010023.AAC19094@ppp114.cartsys.com> Precedence: bulk At 01:25 5/26/1998 GMT, Darryl Matthews wrote: >What is the DJGPP equivalent (or code fragment) for the atanpi( ) function? I haven't seen that before, but if you'll explain what it does, it'd be easier to come up with an equivalent. Nate Eldredge nate AT cartsys DOT com I thought >this might be a good way to generate a different seed every time. >However, rawclock() seems to be returning zero every time, which causes >me to get the same sequence of random numbers every time. Can anyone >offer any suggestions on what I'm doing wrong or alternate methods? I'm >using Windows NT4--perhaps that has something to do with it? Short code >follows. `rawclock' is buggy in the current version. Presently, it actually returns the number of clock ticks since it was first called. In v2.02, it will work like the documentation says. You could use `time(NULL)' instead, which is also more portable (ANSI). If you expect to run your program more than once a second, you could use the `tv_usec' field returned by `gettimeofday', which is POSIX. See the docs. Nate Eldredge nate AT cartsys DOT com