System.Threading.Timer.TimerComparer.Compare C# (CSharp) Method

Compare() public method

public Compare ( object x, object y ) : int
x object
y object
return int
			public int Compare (object x, object y)
			{
				Timer tx = (x as Timer);
				if (tx == null)
					return -1;
				Timer ty = (y as Timer);
				if (ty == null)
					return 1;
				long result = tx.next_run - ty.next_run;
				if (result == 0)
					return x == y ? 0 : -1;
				return result > 0 ? 1 : -1;
			}
		}
Timer.TimerComparer