home *** CD-ROM | disk | FTP | other *** search
/ RISC DISC 2 / RISC_DISC_2.iso / pd_share / utilities / cli / pgp2 / src / c / gettime < prev    next >
Encoding:
Text File  |  1995-04-29  |  357 b   |  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.