function NTimerServiceStaticClass()
{
	//	Operations
	NTimerServiceStaticClass.prototype.Enable = function(enabled)
	{
		if(enabled == true && this.enableCount != 0)
		{
			this.enableCount ++
			return;
		}
		
		if(enabled == false && this.enableCount == 0)
			return;

		if(enabled)
		{
			this.enableCount ++
			this.timerId = window.setInterval(NTimerService.intervalElapsed, 100);
			return;
		}

		this.enableCount --;
		window.clearInterval(this.timerId);
		this.timerId = null;
	}
	
	//	Event handers
	NTimerServiceStaticClass.prototype.intervalElapsed = function()
	{
		if(NTimerService.enableCount == 0)
			return;
		
		NEventSinkService.IntervalElapsed.Fire();
	}

	//	Fields
	this.length = 2;
	this.enableCount = 0;
	this.timerId = null;
}
//	Static Instance
var NTimerService = new NTimerServiceStaticClass();
