wgengine/magicsock: use mono.Time

magicsock makes multiple calls to Now per packet.
Move to mono.Now. Changing some of the calls to
use package mono has a cascading effect,
causing non-per-packet call sites to also switch.

Signed-off-by: Josh Bleecher Snyder <josh@tailscale.com>
This commit is contained in:
Josh Bleecher Snyder
2021-07-21 11:04:36 -07:00
committed by Josh Bleecher Snyder
parent c2202cc27c
commit 8a3d52e882
8 changed files with 61 additions and 55 deletions

View File

@ -231,7 +231,7 @@ func (e *userspaceEngine) onOpenTimeout(flow flowtrack.Tuple) {
e.logf("open-conn-track: timeout opening %v to node %v; online=%v, lastRecv=%v",
flow, n.Key.ShortString(),
online,
durFmt(e.magicConn.LastRecvActivityOfDisco(n.DiscoKey)))
e.magicConn.LastRecvActivityOfDisco(n.DiscoKey))
}
func durFmt(t time.Time) string {