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

version» Context lines:

pike.git/lib/modules/Filesystem.pmod/Monitor.pmod/basic.pike:1:   //   // Basic filesystem monitor.   // - // $Id: basic.pike,v 1.21 2009/08/06 11:53:01 grubba Exp $ + // $Id: basic.pike,v 1.22 2009/08/07 12:46:48 grubba Exp $   //   // 2009-07-09 Henrik Grubbström   //      //! Basic filesystem monitor.   //!   //! This module is intended to be used for incremental scanning of   //! a filesystem.      //! The default maximum number of seconds between checks of directories
pike.git/lib/modules/Filesystem.pmod/Monitor.pmod/basic.pike:204:    if (st) {    int d = 1 + ((time(1) - st->mtime)>>4);    if (d < 0) d = max_dir_check_interval || global::max_dir_check_interval;    if (d < delta) delta = d;    d = 1 + ((time(1) - st->ctime)>>4);    if (d < 0) d = max_dir_check_interval || global::max_dir_check_interval;    if (d < delta) delta = d;    }    if (last_change <= time(1)) {    // Time until stable. -  d = last_change + (stable_time || global::stable_time) - time(1); +  int d = last_change + (stable_time || global::stable_time) - time(1);    d >>= 1;    if (d < 0) d = 1;    if (d < delta) delta = d;    }    next_poll = time(1) + (delta || 1);    monitor_queue->adjust(this);    }       //! Check for changes.    //!