Fix a race condition in the timestamp unit test

It's possible, if the test is run at just the wrong time, for the test to create a need in one second and test the timestamp in the next second, breaking the test.