summaryrefslogtreecommitdiff
path: root/accel-pppd/session.c
diff options
context:
space:
mode:
authorDmitry Kozlov <xeb@mail.ru>2014-10-03 21:59:07 +0400
committerDmitry Kozlov <xeb@mail.ru>2014-10-03 21:59:07 +0400
commit9994d48250e3805565f709d39ea0de4877436c6c (patch)
tree23ef90295715bb672a80da7fb1c7f9614cb2375e /accel-pppd/session.c
parent8a7290359a446ce04c468b2a598ca75a6e2a9611 (diff)
downloadaccel-ppp-9994d48250e3805565f709d39ea0de4877436c6c.tar.gz
accel-ppp-9994d48250e3805565f709d39ea0de4877436c6c.zip
get rid of time(), use clock_gettime(CLOCK_MONOTONIC) instead
Diffstat (limited to 'accel-pppd/session.c')
-rw-r--r--accel-pppd/session.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/accel-pppd/session.c b/accel-pppd/session.c
index 8fc61459..b50686cd 100644
--- a/accel-pppd/session.c
+++ b/accel-pppd/session.c
@@ -98,7 +98,7 @@ int __export ap_session_starting(struct ap_session *ses)
ap_session_set_ifindex(ses);
if (ses->state != AP_STATE_RESTORE) {
- ses->start_time = time(NULL);
+ ses->start_time = _time();
ses->idle_time = ses->start_time;
generate_sessionid(ses);
@@ -204,7 +204,7 @@ void __export ap_session_terminate(struct ap_session *ses, int cause, int hard)
return;
if (!ses->stop_time)
- time(&ses->stop_time);
+ ses->stop_time = _time();
if (!ses->terminate_cause)
ses->terminate_cause = cause;
@@ -303,7 +303,7 @@ int __export ap_session_read_stats(struct ap_session *ses, struct rtnl_link_stat
stats->tx_bytes -= ses->acct_tx_bytes_i;
if (stats->rx_bytes != ses->acct_rx_bytes || stats->tx_bytes != ses->acct_tx_bytes)
- time(&ses->idle_time);
+ ses->idle_time = _time();
if (stats->rx_bytes < ses->acct_rx_bytes)
ses->acct_input_gigawords++;