Fix for timer running slowly in a background tab by comparing Date objects.