test/spinlock: amortize the cost of getting time