public bool RefireMillis(long intervalMS) { long num = TimeGate.timeSource; if (!this.initialized) { this.initialized = true; this.startTime = num; return(true); } if (intervalMS == 0) { bool flag = num != this.startTime; this.startTime = num; return(flag); } if (intervalMS < (long)0) { if (this.startTime - num > intervalMS) { return(false); } this.startTime = num; return(true); } if (num - this.startTime < intervalMS) { return(false); } TimeGate timeGate = this; timeGate.startTime = timeGate.startTime + intervalMS; return(true); }
public bool RefireSeconds(double intervalSeconds) { return(this.RefireMillis(TimeGate.SecondsToMS(intervalSeconds))); }
public bool ElapsedSeconds(double seconds) { return(seconds <= 0 || !this.initialized ? true : TimeGate.timeSource - this.startTime >= TimeGate.SecondsToMS(seconds)); }