use the same timestamp in the while loop, instead of a new one each iteration