summaryrefslogtreecommitdiffstats
path: root/g10/tofu.c
diff options
context:
space:
mode:
authorJustus Winter <justus@g10code.com>2016-11-02 12:45:18 +0100
committerJustus Winter <justus@g10code.com>2016-11-02 12:45:18 +0100
commit5d4f1408d0dd055d412ae44bb4a0f28f74617f05 (patch)
tree5c906120be163e03c6bf0e81b6b2925ab46a6e2f /g10/tofu.c
parentcommon: New function gnupg_usleep. (diff)
downloadgnupg2-5d4f1408d0dd055d412ae44bb4a0f28f74617f05.tar.xz
gnupg2-5d4f1408d0dd055d412ae44bb4a0f28f74617f05.zip
g10,w32: Fix build on Windows.
* g10/tofu.c (begin_transaction): Use the new 'gnupg_usleep'. Signed-off-by: Justus Winter <justus@g10code.com>
Diffstat (limited to '')
-rw-r--r--g10/tofu.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/g10/tofu.c b/g10/tofu.c
index 8280321d7..46d948402 100644
--- a/g10/tofu.c
+++ b/g10/tofu.c
@@ -192,7 +192,6 @@ begin_transaction (ctrl_t ctrl, int only_batch)
&& dbs->batch_update_started != gnupg_get_time ())
{
struct stat statbuf;
- struct timespec ts;
/* If we are in a batch update, then batch updates better have
been enabled. */
@@ -209,9 +208,7 @@ begin_transaction (ctrl_t ctrl, int only_batch)
/* Yield to allow another process a chance to run. Note:
* testing suggests that anything less than a 100ms tends to
* not result in the other process getting the lock. */
- memset (&ts, 0, sizeof (ts));
- ts.tv_nsec = 100 * 1000 * 1000;
- nanosleep (&ts, &ts);
+ gnupg_usleep (100000);
}
else
dbs->batch_update_started = gnupg_get_time ();