js/lib/Flasher.js
function (name, seconds, callback) {
        if (!this._timers) {
            this._timers = {};
        }
        if (!seconds) {
            clearTimeout(this._timers[name]);
            delete this._timers[name];
        }
        else {
            this._timers[name] = setTimeout(function () {
                //logger.error("Flasher failWatch failed waiting on " + name);
                if (callback) {
                    callback("failed waiting on " + name);
                }
            }, seconds * 1000);
        }
    }
function (name, seconds, callback) {
        if (!this._timers) {
            this._timers = {};
        }
        if (!seconds) {
            clearTimeout(this._timers[name]);
            delete this._timers[name];
        }
        else {
            this._timers[name] = setTimeout(function () {
                //logger.error("Flasher failWatch failed waiting on " + name);
                if (callback) {
                    callback("failed waiting on " + name);
                }
            }, seconds * 1000);
        }
    }
function ( name , seconds , callback ) { if ( ! this . _timers ) { this . _timers = { } ; } if ( ! seconds ) { clearTimeout ( this . _timers [ name ] ) ; delete this . _timers [ name ] ; } else { this . _timers [ name ] = setTimeout ( function ( ) { //logger.error("Flasher failWatch failed waiting on " + name); if ( callback ) { callback ( "failed waiting on " + name ) ; } } , seconds * 1000 ) ; } }
Helper for managing a set of named timers and failure callbacks
@param name
@param seconds
@param callback
Helper for managing a set of named timers and failure callbacks