From 9b553b3ddfdde52ba80aacd8f32bcb27569b5cbc Mon Sep 17 00:00:00 2001 From: Dmitry Antipov Date: Thu, 3 Sep 2020 11:11:31 +0300 Subject: glusterfsd, libglusterfs, rpc: prefer libglusterfs time API Use timespec_now_realtime() rather than clock_gettime(). Change-Id: I8fa00b7c0f7b388305c7d19574be3b409db68558 Signed-off-by: Dmitry Antipov Updates: #1002 --- glusterfsd/src/gf_attach.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'glusterfsd') 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); { -- cgit