home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / protocol / time / ntp / 844 < prev    next >
Encoding:
Internet Message Format  |  1992-08-26  |  1.7 KB

  1. Path: sparky!uunet!news.claremont.edu!ucivax!orion.oac.uci.edu!nntpsrv
  2. From: iglesias@draco.acs.uci.edu (Mike Iglesias)
  3. Subject: Changes to allow tick and tickadj to be set from Config files
  4. Nntp-Posting-Host: draco.acs.uci.edu
  5. Message-ID: <2A9BAB74.19419@orion.oac.uci.edu>
  6. Newsgroups: comp.protocols.time.ntp
  7. Organization: University of California, Irvine
  8. Lines: 48
  9. Date: 26 Aug 92 16:04:05 GMT
  10.  
  11.  
  12. As I promised, here are the changes to make xntpd/ntp_unixclock.c accept
  13. tick and tickadj from the Config files.  Just put -DTICK=xx and 
  14. -DTICKADJ=xx on the DEFS line and ntp_unixclock.c will pick up those
  15. values.  For example:
  16.  
  17. DEFS= -DREFCLOCK -DNOKMEM -DDEBUG -D_BSD_SIGNALS -DTICK=100 -DTICKADJ=1
  18.  
  19. Note that this only works for systems that need -DNOKMEM in the Config
  20. file.  If either (or both) TICK and TICKADJ are not specified in the Config
  21. file, the old way of setting them will still work. 
  22.  
  23.  
  24. Mike Iglesias                        Internet:    iglesias@draco.acs.uci.edu
  25. University of California, Irvine     BITNET:      iglesias@uci
  26. Office of Academic Computing         uucp:        ...!ucbvax!ucivax!iglesias
  27. Distributed Computing Support        phone:       (714) 856-6926
  28.  
  29.  
  30. Feed this to patch:
  31.  
  32. *** ntp_unixclock.c.dist    Wed Aug 19 19:27:31 1992
  33. --- ntp_unixclock.c    Tue Aug 25 13:02:09 1992
  34. ***************
  35. *** 600,611 ****
  36. --- 600,621 ----
  37.   #ifndef HZ
  38.   #define HZ    60
  39.   #endif
  40. + #ifdef TICKADJ
  41. +     *tickadj = TICKADJ;
  42. + #else    
  43.   #ifdef RS6000
  44.       *tickadj = 1000;
  45.   #else
  46.       *tickadj = 500 / HZ;
  47.   #endif /*RS6000*/
  48. + #endif /*TICKADJ*/
  49. + #ifdef TICK
  50. +     *tick = TICK;
  51. + #else
  52.       *tick = 1000000L / HZ;
  53. + #endif /*TICK*/
  54.   #ifdef    DEBUG
  55.       if (debug)
  56.           printf("NOTE: Using preset values for tick and tickadj !!\n");
  57.