home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / OPENSTEP / Games / NeXTGo-3.0-MIS / seed.c < prev    next >
Encoding:
C/C++ Source or Header  |  1997-07-06  |  464 b   |  27 lines

  1. #include "comment.header"
  2.  
  3. /* $Id: seed.c,v 1.3 1997/07/06 19:35:07 ergo Exp $ */
  4.  
  5. /*
  6.  * $Log: seed.c,v $
  7.  * Revision 1.3  1997/07/06 19:35:07  ergo
  8.  * actual version
  9.  *
  10.  * Revision 1.2  1997/05/04 18:57:11  ergo
  11.  * added time control for moves
  12.  *
  13.  */
  14.  
  15. #include <sys/time.h>
  16.  
  17. void seed(int *i)
  18. /* start seed of random number generator for Sun */
  19.   {
  20.    struct timeval tp;
  21.    struct timezone tzp;
  22.  
  23.    gettimeofday(&tp, &tzp);
  24.    *i = tp.tv_usec;
  25. }  /* end seed */
  26.  
  27.