Skip to content

Commit

Permalink
fix: uptime/first/last are in millisecond (#304)
Browse files Browse the repository at this point in the history
  • Loading branch information
lspgn authored Apr 3, 2024
1 parent c109a5f commit 1b390e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions producer/proto/producer_nflegacy.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ func ConvertNetFlowLegacyRecord(flowMessage *ProtoProducerMessage, baseTime uint

timeDiffFirst := (uptime - record.First)
timeDiffLast := (uptime - record.Last)
flowMessage.TimeFlowStartNs = baseTime - uint64(timeDiffFirst)*1000000000
flowMessage.TimeFlowEndNs = baseTime - uint64(timeDiffLast)*1000000000
flowMessage.TimeFlowStartNs = baseTime - uint64(timeDiffFirst)*1000000
flowMessage.TimeFlowEndNs = baseTime - uint64(timeDiffLast)*1000000

v := make([]byte, 4)
binary.BigEndian.PutUint32(v, uint32(record.NextHop))
Expand Down

0 comments on commit 1b390e4

Please sign in to comment.