anchor.diff:  		while(1)	//far more efficient than recursively calling ourself
   			if(processing_interval > 0)
   				++iteration
  -
  +				var/startingtick = world.time
   				start_time = world.timeofday
   				var/SubSystemRan = 0
   				for(var/datum/subsystem/SS in subsystems)
   					if(SS.can_fire > 0)
  -						if(SS.next_fire <= world.time)
  +						if(SS.next_fire <= world.time && SS.last_fire+(SS.wait*0.5) <= world.time)
   							SubSystemRan = 1
   							timer = world.timeofday
   							last_thing_processed = SS.type
  
positive.code: 							if (SS.dynamic_wait)
  								var/oldwait = SS.wait
  								var/GlobalCostDelta = (SSCostPerSecond-(SS.cost/(SS.wait/10)))-1
  								var/NewWait = MC_AVERAGE(oldwait,(SS.cost-SS.dwait_buffer+GlobalCostDelta)*SS.dwait_delta)
  								SS.wait = Clamp(NewWait,SS.dwait_lower,SS.dwait_upper)
  								if (oldwait != SS.wait)
  									calculateGCD()
  							SS.next_fire += SS.wait
  							++SS.times_fired
  
  							sleep(-1)
  
  				cost = MC_AVERAGE(cost, world.timeofday - start_time)
  				if (SubSystemRan)
  					calculateSScost()
  				sleep(processing_interval)
  			else
  				sleep(50)
  
  
negative.code: */
  /datum/controller/game_controller/proc/calculateGCD()
  	var/GCD
  	//shortest fire rate is the lower of two ticks or 1ds
  	var/minimumInterval = min(world.tick_lag*2,1)
  	for(var/datum/subsystem/SS in subsystems)
  		if(SS.wait)
  			GCD = Gcd(round(SS.wait*10), GCD)
  	GCD = round(GCD)
  	if(GCD < minimumInterval*10)
  		GCD = minimumInterval*10
  	processing_interval = GCD/10
  
  /datum/controller/game_controller/proc/setup(zlevel)
  