git.samba.org
/
abartlet
/
samba.git
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b9108ca
)
s3/pthreadpool: replace bad portable gettimeofday by clock_gettime
author
Björn Jacke
<bj@sernet.de>
Sun, 5 Jun 2011 19:30:16 +0000
(21:30 +0200)
committer
Bjoern Jacke
<bj@sernet.de>
Mon, 6 Jun 2011 09:48:10 +0000
(11:48 +0200)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
source3/lib/pthreadpool/pthreadpool.c
patch
|
blob
|
history
diff --git
a/source3/lib/pthreadpool/pthreadpool.c
b/source3/lib/pthreadpool/pthreadpool.c
index 7538fb79955fb4ff379bda4647705747fe61be96..9981ed25ae6f7ab3ede05adc44cfe07d75e5b5a9 100644
(file)
--- 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)) {