I have a List where T is my Event type which has a field time of type long. This list is populated from
Your custom IComparer is incorrect. With correct logic, it should work just fine. The problem is that if the left value is zero, any value will be equal to it. This means that 0 == 3 is true, and 3 > 0 is true. In fact, 0 > 3 and 3 < 0 should be true
You should do something like this instead:
if (x.time == y.time) return 0;
if (x.time == 0) return 1;
if (y.time == 0) return -1;
return x.time.CompareTo(y.time);