Maybe save time() in a variable before the loop as it might drift a few milliseconds if the list is long. Even if improbably, we'd better avoid risking side effects.