     public function ExpiringSet (ttl :Number)
     {
         _ttl = Math.round(ttl * 1000);
+        _timer = new Timer(_ttl, 1);
+        _timer.addEventListener(TimerEvent.TIMER, checkTimer);
     }
 
     /**

    public function add (o :Object) :Boolean
    {
        var added :Boolean = true;
        var element :ExpiringElement;
        var expire :int = getTimer() + _ttl;
        for (var ii :int = 0; ii < _data.length; ii++) {
            if ((_data[ii] as ExpiringElement).objectEquals(o)) {
                // already contained - update expire time and remove from current position.
                element = _data[ii] as ExpiringElement;
                element.expirationTime = expire;
                _data.splice(ii, 1);
                added = false;
                break;

    public function forEach (fn :Function) :void
    {
        for each (var e :ExpiringElement in _data) {
            fn(e.element);
        }
    }

