• Thomas Haller's avatar
    dhcp/nettools: round time difference when calculating the lease lifetime · 87680c41
    Thomas Haller authored
    nettools does not expose the original lease lifetime. It's a missing
    API. Instead, it only exposes the timestamp when the lease will expire.
    
    As a workaround, we calulate the timestamp by subtracting the current
    timestamp from the expiration timestamp, assuming that the lease was
    received just now. However, it was not received *exactly* now, but a
    few milliseconds before. Hence, the calculated timestamp is not exact
    here and likely a few milliseconds less then the actual (full integer)
    value.
    
    Account for that by rounding the value to the second.
    87680c41
Name
Last commit
Last update
..
devices Loading commit data...
dhcp Loading commit data...
dns Loading commit data...
dnsmasq Loading commit data...
initrd Loading commit data...
ndisc Loading commit data...
platform Loading commit data...
ppp Loading commit data...
settings Loading commit data...
supplicant Loading commit data...
systemd Loading commit data...
tests Loading commit data...
vpn Loading commit data...
NetworkManagerUtils.c Loading commit data...
NetworkManagerUtils.h Loading commit data...
main-utils.c Loading commit data...
main-utils.h Loading commit data...
main.c Loading commit data...
meson.build Loading commit data...
nm-act-request.c Loading commit data...
nm-act-request.h Loading commit data...
nm-active-connection.c Loading commit data...
nm-active-connection.h Loading commit data...
nm-audit-manager.c Loading commit data...
nm-audit-manager.h Loading commit data...
nm-auth-manager.c Loading commit data...
nm-auth-manager.h Loading commit data...
nm-auth-subject.c Loading commit data...
nm-auth-subject.h Loading commit data...
nm-auth-utils.c Loading commit data...
nm-auth-utils.h Loading commit data...
nm-checkpoint-manager.c Loading commit data...
nm-checkpoint-manager.h Loading commit data...
nm-checkpoint.c Loading commit data...
nm-checkpoint.h Loading commit data...
nm-config-data.c Loading commit data...
nm-config-data.h Loading commit data...
nm-config.c Loading commit data...
nm-config.h Loading commit data...
nm-connectivity.c Loading commit data...
nm-connectivity.h Loading commit data...
nm-core-utils.c Loading commit data...
nm-core-utils.h Loading commit data...
nm-dbus-manager.c Loading commit data...
nm-dbus-manager.h Loading commit data...
nm-dbus-object.c Loading commit data...
nm-dbus-object.h Loading commit data...
nm-dbus-utils.c Loading commit data...
nm-dbus-utils.h Loading commit data...
nm-dcb.c Loading commit data...
nm-dcb.h Loading commit data...
nm-dhcp4-config.c Loading commit data...
nm-dhcp4-config.h Loading commit data...
nm-dhcp6-config.c Loading commit data...
nm-dhcp6-config.h Loading commit data...
nm-dispatcher.c Loading commit data...
nm-dispatcher.h Loading commit data...
nm-firewall-manager.c Loading commit data...
nm-firewall-manager.h Loading commit data...
nm-hostname-manager.c Loading commit data...
nm-hostname-manager.h Loading commit data...
nm-iface-helper.c Loading commit data...
nm-ip4-config.c Loading commit data...
nm-ip4-config.h Loading commit data...
nm-ip6-config.c Loading commit data...
nm-ip6-config.h Loading commit data...
nm-keep-alive.c Loading commit data...
nm-keep-alive.h Loading commit data...
nm-logging.c Loading commit data...
nm-logging.h Loading commit data...
nm-manager.c Loading commit data...
nm-manager.h Loading commit data...
nm-netns.c Loading commit data...
nm-netns.h Loading commit data...
nm-pacrunner-manager.c Loading commit data...
nm-pacrunner-manager.h Loading commit data...
nm-policy.c Loading commit data...
nm-policy.h Loading commit data...
nm-proxy-config.c Loading commit data...
nm-proxy-config.h Loading commit data...
nm-rfkill-manager.c Loading commit data...
nm-rfkill-manager.h Loading commit data...
nm-session-monitor.c Loading commit data...
nm-session-monitor.h Loading commit data...
nm-sleep-monitor.c Loading commit data...
nm-sleep-monitor.h Loading commit data...
nm-test-utils-core.h Loading commit data...
nm-types.h Loading commit data...
org.freedesktop.NetworkManager.conf Loading commit data...