Core.Object.extend('Anim.TimeManager', 
/**@lends Anim.TimeManager#*/
{
	clocks: undefined,
	timer: undefined,
	start: 0,

	/**
    *   @constructs
	*	@class The TimeManager handle animations clocks
    *   @extends Core.Object
	*/
	constructor: function(config) {
		this.clocks = [];
		this.start = new Date().getTime();
		this.addEvents('tick');
	},

	add: function(clock) {
		this.clocks.push(clock);
		if(this.clocks.length === 1)
			this.timer = new Core.Timer({ onTimeupdate: this.onTick, scope: this, interval: 1/60 });
	},

	remove: function(clock) {
		var i = 0;
		while((i < this.clocks.length) && (this.clocks[i] != clock)) { i++; }
		if(i < this.clocks.length)
			this.clocks.splice(i, 1);
		if(this.clocks.length === 0) {
			this.timer.abort();
			this.timer = undefined;
		}
	},

	
	/**	@Private*/
	onTick: function() {
		var current = (new Date().getTime()) - this.start;
		current /= 1000;
		for(var i = 0; i < this.clocks.length; i++)
			this.clocks[i].update(current);
		this.fireEvent('tick');
	}
});

Anim.TimeManager.current = new Anim.TimeManager();

@@ -427,16 +427,18 @@
 h === 1)
+ %7B
 %0A%09%09%09this
@@ -467,66 +467,86 @@
 r(%7B 
-onTimeupdate: this.onTick, scope: this, interval: 1/60 %7D);
+interval: 1/60 %7D);%0A%09%09%09this.connect(this.timer, 'timeupdate', this.onTick);%0A%09%09%7D
 %0A%09%7D,

allow sending javascript using the remote debug