aboutsummaryrefslogtreecommitdiffstats
path: root/src/libfast/dispatcher.c
diff options
context:
space:
mode:
authorMartin Willi <martin@strongswan.org>2009-08-31 17:59:00 +0200
committerMartin Willi <martin@strongswan.org>2009-08-31 18:00:28 +0200
commit6180a55852afaf7fee4086a45dccbff9d7f7dfa8 (patch)
tree61968edccb4b5b5e39a045b16067299f1e5cda02 /src/libfast/dispatcher.c
parentde5784452b31af3c7342269127a12d352edc0b4e (diff)
downloadstrongswan-6180a55852afaf7fee4086a45dccbff9d7f7dfa8.tar.bz2
strongswan-6180a55852afaf7fee4086a45dccbff9d7f7dfa8.tar.xz
use time_monotonic() instead of time() for statistics and time difference calculations
Diffstat (limited to 'src/libfast/dispatcher.c')
-rw-r--r--src/libfast/dispatcher.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libfast/dispatcher.c b/src/libfast/dispatcher.c
index 35ae55814..9f4cc014a 100644
--- a/src/libfast/dispatcher.c
+++ b/src/libfast/dispatcher.c
@@ -174,7 +174,7 @@ static session_entry_t *session_entry_create(private_dispatcher_t *this,
entry->closed = FALSE;
pthread_cond_init(&entry->cond, NULL);
entry->session = load_session(this);
- entry->used = time(NULL);
+ entry->used = time_monotonic(NULL);
entry->host = strdup(host);
return entry;
@@ -237,7 +237,7 @@ static void dispatch(private_dispatcher_t *this)
continue;
}
sid = request->get_cookie(request, "SID");
- now = time(NULL);
+ now = time_monotonic(NULL);
/* find session */
pthread_mutex_lock(&this->mutex);
@@ -281,7 +281,7 @@ static void dispatch(private_dispatcher_t *this)
/* start processing */
found->session->process(found->session, request);
- found->used = time(NULL);
+ found->used = time_monotonic(NULL);
/* release session */
pthread_mutex_lock(&this->mutex);