summaryrefslogtreecommitdiff
path: root/src/supplicant
diff options
context:
space:
mode:
authorLubomir Rintel <lkundrak@v3.sk>2018-06-15 13:57:30 +0200
committerThomas Haller <thaller@redhat.com>2018-06-15 16:23:30 +0200
commit07fd0502f68a1116ee4cfdb31b24b422b142847f (patch)
tree8a41f61869af658b60c09b25f2b8eeee5f0950e5 /src/supplicant
parent1c0aa397b372cf6cccaacd11546cc99011090d35 (diff)
downloadNetworkManager-07fd0502f68a1116ee4cfdb31b24b422b142847f.tar.gz
wifi: expose LastScan as milliseconds not seconds
This doesn't wrap around in 68 years of uptime and is consistent with o.fd.NM.Checkpoint.Created.
Diffstat (limited to 'src/supplicant')
-rw-r--r--src/supplicant/nm-supplicant-interface.c16
-rw-r--r--src/supplicant/nm-supplicant-interface.h2
2 files changed, 9 insertions, 9 deletions
diff --git a/src/supplicant/nm-supplicant-interface.c b/src/supplicant/nm-supplicant-interface.c
index 3511b151e4..71e6a35ac5 100644
--- a/src/supplicant/nm-supplicant-interface.c
+++ b/src/supplicant/nm-supplicant-interface.c
@@ -129,7 +129,7 @@ typedef struct {
GHashTable * bss_proxies;
char * current_bss;
- gint32 last_scan; /* timestamp as returned by nm_utils_get_monotonic_timestamp_s() */
+ gint64 last_scan; /* timestamp as returned by nm_utils_get_monotonic_timestamp_ms() */
} NMSupplicantInterfacePrivate;
@@ -209,7 +209,7 @@ bss_proxy_properties_changed_cb (GDBusProxy *proxy,
NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self);
if (priv->scanning)
- priv->last_scan = nm_utils_get_monotonic_timestamp_s ();
+ priv->last_scan = nm_utils_get_monotonic_timestamp_ms ();
g_signal_emit (self, signals[BSS_UPDATED], 0,
g_dbus_proxy_get_object_path (proxy),
@@ -344,7 +344,7 @@ set_state (NMSupplicantInterface *self, NMSupplicantInterfaceState new_state)
if ( priv->state == NM_SUPPLICANT_INTERFACE_STATE_SCANNING
|| old_state == NM_SUPPLICANT_INTERFACE_STATE_SCANNING)
- priv->last_scan = nm_utils_get_monotonic_timestamp_s ();
+ priv->last_scan = nm_utils_get_monotonic_timestamp_ms ();
/* Disconnect reason is no longer relevant when not in the DISCONNECTED state */
if (priv->state != NM_SUPPLICANT_INTERFACE_STATE_DISCONNECTED)
@@ -406,7 +406,7 @@ set_scanning (NMSupplicantInterface *self, gboolean new_scanning)
/* Cache time of last scan completion */
if (priv->scanning == FALSE)
- priv->last_scan = nm_utils_get_monotonic_timestamp_s ();
+ priv->last_scan = nm_utils_get_monotonic_timestamp_ms ();
_notify (self, PROP_SCANNING);
}
@@ -438,8 +438,8 @@ nm_supplicant_interface_get_current_bss (NMSupplicantInterface *self)
return priv->state >= NM_SUPPLICANT_INTERFACE_STATE_READY ? priv->current_bss : NULL;
}
-gint32
-nm_supplicant_interface_get_last_scan_time (NMSupplicantInterface *self)
+gint64
+nm_supplicant_interface_get_last_scan (NMSupplicantInterface *self)
{
return NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self)->last_scan;
}
@@ -987,7 +987,7 @@ wpas_iface_scan_done (GDBusProxy *proxy,
NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self);
/* Cache last scan completed time */
- priv->last_scan = nm_utils_get_monotonic_timestamp_s ();
+ priv->last_scan = nm_utils_get_monotonic_timestamp_ms ();
priv->scan_done_success |= success;
scan_done_emit_signal (self);
}
@@ -1002,7 +1002,7 @@ wpas_iface_bss_added (GDBusProxy *proxy,
NMSupplicantInterfacePrivate *priv = NM_SUPPLICANT_INTERFACE_GET_PRIVATE (self);
if (priv->scanning)
- priv->last_scan = nm_utils_get_monotonic_timestamp_s ();
+ priv->last_scan = nm_utils_get_monotonic_timestamp_ms ();
bss_add_new (self, path);
}
diff --git a/src/supplicant/nm-supplicant-interface.h b/src/supplicant/nm-supplicant-interface.h
index f32ad8dda2..31272b3c11 100644
--- a/src/supplicant/nm-supplicant-interface.h
+++ b/src/supplicant/nm-supplicant-interface.h
@@ -110,7 +110,7 @@ gboolean nm_supplicant_interface_get_scanning (NMSupplicantInterface *self);
const char *nm_supplicant_interface_get_current_bss (NMSupplicantInterface *self);
-gint32 nm_supplicant_interface_get_last_scan_time (NMSupplicantInterface *self);
+gint64 nm_supplicant_interface_get_last_scan (NMSupplicantInterface *self);
const char *nm_supplicant_interface_get_ifname (NMSupplicantInterface *self);