This has been sporadically failing on macos for a while. We've tried a couple of things (using int arithmetic, normalizing to gettimeofday), but this issue remains. I'm adding some tolerance to the test to avoid CI failures.