home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 2
/
Apprentice-Release2.iso
/
Source Code
/
C
/
Games
/
MacGnuGo 0.5e
/
gnugo.src
/
seed.c
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1993-10-25
|
326 b
|
23 lines
|
[
TEXT/R*ch
]
#include "comment.header"
#define MAC
#ifdef MAC
void seed(long int *i)
{ *i = TickCount(); }
#else
#include <sys/time.h>
void seed(long int *i)
/* start seed of random number generator for Sun */
{
struct timeval tp;
struct timezone tzp;
gettimeofday(&tp, &tzp);
*i = tp.tv_usec;
} /* end seed */
#endif