float?Apex.LoadBalancing.ILoadBalanced.ExecuteUpdate(float deltaTime, float nextInterval) { this.repeat = this._action(deltaTime); if (!this.repeat) { LoadBalancedActionPool.Return(this); } return(null); }
float?ILoadBalanced.ExecuteUpdate(float deltaTime, float nextInterval) { bool moreWork = true; _watch.Reset(); _watch.Start(); while (moreWork && _watch.ElapsedMilliseconds < _maxMillisecondsUsedPerFrame) { moreWork = _iter.MoveNext(); } this.repeat = moreWork; if (!moreWork) { LoadBalancedActionPool.Return(this); } return(0f); }
float?ILoadBalanced.ExecuteUpdate(float deltaTime, float nextInterval) { _action(); LoadBalancedActionPool.Return(this); return(null); }