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

Diff of /ircd-hybrid/branches/8.1.x/src/event.c

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

revision 2678 by michael, Sat Dec 14 21:33:10 2013 UTC revision 2679 by michael, Sun Dec 15 18:37:41 2013 UTC
# Line 58  Line 58 
58  #include "memory.h"  #include "memory.h"
59  #include "log.h"  #include "log.h"
60  #include "numeric.h"  #include "numeric.h"
61    #include "rng_mt.h"
62    
63    
64  static const char *last_event_ran = NULL;  static const char *last_event_ran = NULL;
65  static struct ev_entry event_table[MAX_EVENTS];  static struct ev_entry event_table[MAX_EVENTS];
# Line 132  eventDelete(EVH *func, void *arg) Line 134  eventDelete(EVH *func, void *arg)
134  void  void
135  eventAddIsh(const char *name, EVH *func, void *arg, time_t delta_ish)  eventAddIsh(const char *name, EVH *func, void *arg, time_t delta_ish)
136  {  {
137    if (delta_ish >= 3.0)    if (delta_ish >= 3)
138    {    {
139      const time_t two_third = (2 * delta_ish) / 3;      const time_t two_third = (2 * delta_ish) / 3;
140      delta_ish = two_third + ((rand() % 1000) * two_third) / 1000;      delta_ish = two_third + ((genrand_int32() % 1000) * two_third) / 1000;
141        /*        /*
142         * XXX I hate the above magic, I don't even know if its right.         * XXX I hate the above magic, I don't even know if its right.
143         * Grr. -- adrian         * Grr. -- adrian

Legend:
Removed from v.2678  
changed lines
  Added in v.2679

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