} else { final NetworkStatistic lastObservedNetworkStatistic = this.networkStatisticMap.get(interfaceName); final long timeDifference = currentNetworkStatistic.getTimestamp() - lastObservedNetworkStatistic.getTimestamp(); if (timeDifference <= 0) { throw new IllegalStateException("Timestamp of new observation should be strictly larger than the previous one."); final double rxPacketsPerSecond = rxPacketsDifference / (double) TimeUnit.SECONDS.convert(timeDifference, timeUnit); final NetworkUtilizationRecord r = new NetworkUtilizationRecord(currentNetworkStatistic.getTimestamp(), monitoringController.getHostname(), interfaceName, currentNetworkStatistic.getSpeed(), txBytesPerSecond, txCarrierPerSecond, txCollisionsPerSecond, txDroppedPerSecond, txErrorsPerSecond, txOverrunsPerSecond, txPacketsPerSecond, rxBytesPerSecond, rxDroppedPerSecond, rxErrorsPerSecond, rxFramePerSecond,
} else { final NetworkStatistic lastObservedNetworkStatistic = this.networkStatisticMap.get(interfaceName); final long timeDifference = currentNetworkStatistic.getTimestamp() - lastObservedNetworkStatistic.getTimestamp(); if (timeDifference <= 0) { throw new IllegalStateException("Timestamp of new observation should be strictly larger than the previous one."); final double rxPacketsPerSecond = rxPacketsDifference / (double) TimeUnit.SECONDS.convert(timeDifference, timeUnit); final NetworkUtilizationRecord r = new NetworkUtilizationRecord(currentNetworkStatistic.getTimestamp(), monitoringController.getHostname(), interfaceName, currentNetworkStatistic.getSpeed(), txBytesPerSecond, txCarrierPerSecond, txCollisionsPerSecond, txDroppedPerSecond, txErrorsPerSecond, txOverrunsPerSecond, txPacketsPerSecond, rxBytesPerSecond, rxDroppedPerSecond, rxErrorsPerSecond, rxFramePerSecond,