test/rwlock: amortize the cost of getting time