summaryrefslogtreecommitdiff
path: root/source3/lib
diff options
context:
space:
mode:
authorBjörn Jacke <bj@sernet.de>2011-06-05 21:30:16 +0200
committerBjoern Jacke <bj@sernet.de>2011-06-06 11:48:10 +0200
commit4778d35c34031f7724379ac2d3b554af4adc48dc (patch)
tree26906a0c8f354350da964180d6138089a1aa2878 /source3/lib
parentb9108cac529dac4b4b392fab4bac4fd0e6da1b4b (diff)
downloadsamba-4778d35c34031f7724379ac2d3b554af4adc48dc.tar.gz
samba-4778d35c34031f7724379ac2d3b554af4adc48dc.tar.bz2
samba-4778d35c34031f7724379ac2d3b554af4adc48dc.zip
s3/pthreadpool: replace bad portable gettimeofday by clock_gettime
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'source3/lib')
-rw-r--r--source3/lib/pthreadpool/pthreadpool.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source3/lib/pthreadpool/pthreadpool.c b/source3/lib/pthreadpool/pthreadpool.c
index 7538fb7995..9981ed25ae 100644
--- a/source3/lib/pthreadpool/pthreadpool.c
+++ b/source3/lib/pthreadpool/pthreadpool.c
@@ -427,7 +427,6 @@ static void *pthreadpool_server(void *arg)
}
while (1) {
- struct timeval tv;
struct timespec ts;
struct pthreadpool_job *job;
@@ -436,9 +435,8 @@ static void *pthreadpool_server(void *arg)
* time, exit this thread.
*/
- gettimeofday(&tv, NULL);
- ts.tv_sec = tv.tv_sec + 1;
- ts.tv_nsec = tv.tv_usec*1000;
+ clock_gettime(CLOCK_REALTIME, &ts);
+ ts.tv_sec += 1;
while ((pool->jobs == NULL) && (pool->shutdown == 0)) {