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 /rpc/rpc-lib/src/rpc-clnt.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 'rpc/rpc-lib/src/rpc-clnt.c')
-rw-r--r-- | rpc/rpc-lib/src/rpc-clnt.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/rpc/rpc-lib/src/rpc-clnt.c b/rpc/rpc-lib/src/rpc-clnt.c index 2b0ec295525..517037c4a5d 100644 --- a/rpc/rpc-lib/src/rpc-clnt.c +++ b/rpc/rpc-lib/src/rpc-clnt.c @@ -919,7 +919,7 @@ rpc_clnt_notify(rpc_transport_t *trans, void *mydata, } case RPC_TRANSPORT_MSG_RECEIVED: { - clock_gettime(CLOCK_REALTIME, &conn->last_received); + timespec_now_realtime(&conn->last_received); pollin = data; if (pollin->is_reply) @@ -933,8 +933,7 @@ rpc_clnt_notify(rpc_transport_t *trans, void *mydata, } case RPC_TRANSPORT_MSG_SENT: { - clock_gettime(CLOCK_REALTIME, &conn->last_sent); - + timespec_now_realtime(&conn->last_sent); ret = 0; break; } |