diff options
author | Dmitry Antipov <dmantipov@yandex.ru> | 2020-09-03 11:11:31 +0300 |
---|---|---|
committer | Amar Tumballi <amar@kadalu.io> | 2020-09-07 12:56:08 +0000 |
commit | 9b553b3ddfdde52ba80aacd8f32bcb27569b5cbc (patch) | |
tree | 8ec754b87803f03138203870f03ed23650784b98 /glusterfsd/src/gf_attach.c | |
parent | 4e81a5e47aeee6f5d18387b7af161488cf0f30fa (diff) |
glusterfsd, libglusterfs, rpc: prefer libglusterfs time API
Use timespec_now_realtime() rather than clock_gettime().
Change-Id: I8fa00b7c0f7b388305c7d19574be3b409db68558
Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
Updates: #1002
Diffstat (limited to 'glusterfsd/src/gf_attach.c')
-rw-r--r-- | glusterfsd/src/gf_attach.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/glusterfsd/src/gf_attach.c b/glusterfsd/src/gf_attach.c index c54b4f9b516..c553b0b1f61 100644 --- a/glusterfsd/src/gf_attach.c +++ b/glusterfsd/src/gf_attach.c @@ -99,7 +99,7 @@ send_brick_req(xlator_t *this, struct rpc_clnt *rpc, char *path, int op) iov.iov_len = ret; /* Wait for connection */ - clock_gettime(CLOCK_REALTIME, &ts); + timespec_now_realtime(&ts); ts.tv_sec += CONNECT_TIMEOUT; pthread_mutex_lock(&rpc->conn.lock); { @@ -124,7 +124,7 @@ send_brick_req(xlator_t *this, struct rpc_clnt *rpc, char *path, int op) 0, iobref, frame, NULL, 0, NULL, 0, NULL); if (!ret) { /* OK, wait for callback */ - clock_gettime(CLOCK_REALTIME, &ts); + timespec_now_realtime(&ts); ts.tv_sec += REPLY_TIMEOUT; pthread_mutex_lock(&mutex); { |