/[svn]/ircd-hybrid/branches/8.2.x/src/ircd.c
ViewVC logotype

Diff of /ircd-hybrid/branches/8.2.x/src/ircd.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 8897 by michael, Sun Apr 21 14:10:43 2019 UTC revision 8898 by michael, Sun Apr 21 18:08:01 2019 UTC
# Line 139  struct event event_write_links_file = Line 139  struct event event_write_links_file =
139  void  void
140  set_time(void)  set_time(void)
141  {  {
142    struct timeval newtime = { .tv_sec = 0, .tv_usec = 0 };    struct timespec newtime = { .tv_sec = 0, .tv_nsec = 0 };
143    
144    if (gettimeofday(&newtime, NULL) == -1)    if (clock_gettime(CLOCK_REALTIME, &newtime) == -1)
145    {    {
146      char buf[IRCD_BUFSIZE];      char buf[IRCD_BUFSIZE];
147    
# Line 161  set_time(void) Line 161  set_time(void)
161    }    }
162    
163    SystemTime.tv_sec = newtime.tv_sec;    SystemTime.tv_sec = newtime.tv_sec;
164    SystemTime.tv_usec = newtime.tv_usec;    SystemTime.tv_nsec = newtime.tv_nsec;
165  }  }
166    
167  static void  static void
# Line 382  main(int argc, char *argv[]) Line 382  main(int argc, char *argv[])
382    set_time();    set_time();
383    
384    /* It's not random, but it ought to be a little harder to guess */    /* It's not random, but it ought to be a little harder to guess */
385    init_genrand(SystemTime.tv_sec ^ (SystemTime.tv_usec | (getpid() << 20)));    init_genrand(SystemTime.tv_sec ^ (SystemTime.tv_nsec / 1000 | (getpid() << 20)));
386    
387    ConfigGeneral.dpath      = DPATH;    ConfigGeneral.dpath      = DPATH;
388    ConfigGeneral.spath      = SPATH;    ConfigGeneral.spath      = SPATH;

Legend:
Removed from v.8897  
changed lines
  Added in v.8898

svnadmin@ircd-hybrid.org
ViewVC Help
Powered by ViewVC 1.1.28