From 196a2174036b112e6f95974356b3f66ddca9a0ef Mon Sep 17 00:00:00 2001 From: Johannes Berg Date: Mon, 16 Dec 2013 21:08:38 +0100 Subject: [PATCH] WPS_UPNP: Use monotonic time for event debouncing The event debouncing isn't very accurate (since it doesn't take sub-second resolution into account), but it should use monotonic time anyway since it doesn't care about the wall clock. Signed-hostap: Johannes Berg --- src/wps/wps_upnp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wps/wps_upnp.c b/src/wps/wps_upnp.c index bea2b3312..29e832062 100644 --- a/src/wps/wps_upnp.c +++ b/src/wps/wps_upnp.c @@ -480,14 +480,14 @@ static void upnp_wps_device_send_event(struct upnp_wps_device_sm *sm) "\n" "\n"; const char *format_tail = "\n"; - struct os_time now; + struct os_reltime now; if (dl_list_empty(&sm->subscriptions)) { /* optimize */ return; } - if (os_get_time(&now) == 0) { + if (os_get_reltime(&now) == 0) { if (now.sec != sm->last_event_sec) { sm->last_event_sec = now.sec; sm->num_events_in_sec = 1;