compare static method

int compare(
  1. TimeSpan first,
  2. TimeSpan second
)
override

Compares two TimeSpan objects.

@param first first TimeSpan to use in the compare. @param second second TimeSpan to use in the compare. @return a negative integer, zero, or a positive integer as the first TimeSpan is less than, equal to, or greater than the second TimeSpan.

Implementation

static int compare(TimeSpan first, TimeSpan second) {
  if (first.time == second.time) {
    return 0;
  }
  if (first.time > second.time) {
    return 1;
  }
  return -1;
}