test-utimens: speed up by taking shorter naps
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 8 Nov 2012 07:36:43 +0000 (23:36 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 8 Nov 2012 07:37:01 +0000 (23:37 -0800)
commitda4867d2a6a43f55b0339e06aba975b50b60a570
tree9a020bc9bc7486f16f7afe1f20f99907ecb27af6
parentab7a2b67b48deb4c253b3b6bd983690d71515265
test-utimens: speed up by taking shorter naps

* tests/nap.h (lt_mtime, get_mtime, nap_works, guess_delay):
New functions.
(nap): Use them, to do a better job of guessing the delay.
On Fedora 17 with ext4 atop md atop hard disks, this made
test-utimens run 10x faster, because the test napped for
1 ms at a time rather than 20 ms.  Reported by Stefano Lattarini in
<http://bugs.gnu.org/12820#11>.
ChangeLog
tests/nap.h