pike.git / lib / modules / Filesystem.pmod / Monitor.pmod / basic.pike

version» Context lines:

pike.git/lib/modules/Filesystem.pmod/Monitor.pmod/basic.pike:432:    if ((d >= 0) && (d < delta)) delta = d;    }    if (last_change <= time(1)) {    // Time until stable.    int d = last_change + (stable_time || global::stable_time) - time(1);    d >>= 1;    if (d < 0) d = 1;    if (d < delta) delta = d;    }    if (!next_poll) { -  // Attempt to distribute polls evenly at startup. -  delta = 1 + random(delta); +  // Attempt to distribute polls evenly at startup, and to +  // make sure that the full set of directory contents is +  // found reasonably fast. +  delta = 1 + random(delta >> 2);    }       MON_WERR("Next poll in %d seconds.\n", (delta || 1));    next_poll = time(1) + (delta || 1);    adjust_monitor(this);    }       //! Check if this monitor should be removed automatically.    void check_for_release(int mask, int flags)    {