From 039cd4eb8b5dca66e90139141436a0843257ec09 Mon Sep 17 00:00:00 2001 From: Callan Bryant Date: Sat, 30 May 2020 14:40:07 +0100 Subject: [PATCH] add timestamp to report --- reporttypes.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/reporttypes.go b/reporttypes.go index 8a72fd2..d2410a8 100644 --- a/reporttypes.go +++ b/reporttypes.go @@ -31,6 +31,8 @@ type DsnetReport struct { TransmitBytes uint64 ReceiveBytesSI string TransmitBytesSI string + // when the report was made + Timestamp time.Time } func GenerateReport(dev *wgtypes.Device, conf *DsnetConfig, oldReport *DsnetReport) DsnetReport { @@ -111,6 +113,7 @@ func GenerateReport(dev *wgtypes.Device, conf *DsnetConfig, oldReport *DsnetRepo TransmitBytes: stats.TxBytes, ReceiveBytesSI: BytesToSI(stats.RxBytes), TransmitBytesSI: BytesToSI(stats.TxBytes), + Timestamp: time.Now(), } }