If getTime rounds DOWN, diff > 0 may not be true. I advise using abs(diff) < epsilon.