ATUL_v1.Schedule.CompareTimes C# (CSharp) Method

CompareTimes() public static method

Helper function to compare time constructs for scheduler purposes
public static CompareTimes ( int>.Dictionary x, int>.Dictionary y ) : int
x int>.Dictionary
y int>.Dictionary
return int
        public static int CompareTimes(Dictionary<string, int> x, Dictionary<string, int> y)
        {
            if (x["hours"] > y["hours"])
            {
                return 1;
            }
            else if (x["hours"] < y["hours"])
            {
                return -1;
            }
            else if (x["hours"] == y["hours"] && x["minutes"] > y["minutes"])
            {
                return 1;
            }
            else if (x["hours"] == y["hours"] && x["minutes"] < y["minutes"])
            {
                return -1;
            }
            else
            {
                return 0;
            }
        }