home *** CD-ROM | disk | FTP | other *** search
/ PC-Online 1998 February / PCOnline_02_1998.iso / filesbbs / os2 / pgp263.arj / PGP263I.SRC / PGP263II.ZIP / src / gettime.c < prev    next >
C/C++ Source or Header  |  1995-04-29  |  375b  |  19 lines

  1. /*
  2.  *    Gettimeofday.  Simulate as much as possible.  Only accurate
  3.  *    to nearest second.  tzp is ignored.  Derived from an old
  4.  *    emacs implementation.
  5.  */
  6.  
  7. #include <sys/types.h>
  8. #include <sys/time.h>
  9.  
  10. gettimeofday (tp, tzp)
  11.      struct timeval *tp;
  12.      struct timezone *tzp;
  13. {
  14.   extern long time ();
  15.  
  16.   tp->tv_sec = time ((long *)0);
  17.   tp->tv_usec = 0;
  18. }
  19.