public class MatchingTimeChecker : MatchingIntervalActionBase
{
	private int _timeLimitSecond;

	private string _timeoutlog;

	public MatchingTimeChecker(Matching matching)
		: base(matching)
	{
	}

	public void SetTimeLimitSecond(int timeLimitSecond, string log)
	{
		_timeLimitSecond = timeLimitSecond;
		_timeoutlog = log;
	}

	public override void Update()
	{
		if (_isActive && NetworkUtility.GetTimeSpanSecond(_startTimer.Ticks) >= _timeLimitSecond)
		{
			_isActive = false;
			_matching.TimeOutAction(_timeoutlog);
		}
	}
}
