dhcp/nettools: round time difference when calculating the lease lifetime
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.
Showing with 1 addition and 1 deletion