1: #ifdef  REFCLOCK
   2: /*
   3:  *  A dummy clock reading routine that reads the current system time.
   4:  *  from the local host.  Its possible that this could be actually used
   5:  *  if the system was in fact a very accurate time keeper (a true real-time
   6:  *  system with good crystal clock or better).
   7:  */
   8: 
   9: #include <sys/types.h>
  10: #include <sys/time.h>
  11: 
  12: init_clock_local(file)
  13: char *file;
  14: {
  15:     return getdtablesize(); /* invalid if we ever use it */
  16: }
  17: 
  18: read_clock_local(cfd, tvp, mtvp)
  19: int cfd;
  20: struct timeval **tvp, **mtvp;
  21: {
  22:     static struct timeval realtime, mytime;
  23: 
  24:     gettimeofday(&realtime, 0);
  25:     mytime = realtime;
  26:     *tvp = &realtime;
  27:     *mtvp = &mytime;
  28:     return(0);
  29: }
  30: #endif

Defined functions

init_clock_local defined in line 12; used 2 times
read_clock_local defined in line 18; used 2 times
Last modified: 1989-05-19
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 1039
Valid CSS Valid XHTML 1.0 Strict