needsUpdate method
Checks if routing table needs updating based on time intervals
routingTable - Current routing table
currentTime - Current time for comparison
Returns true if update is needed
Implementation
bool needsUpdate(
DistanceVectorRoutingTable<T> routingTable,
DateTime currentTime,
) {
return currentTime.difference(routingTable.lastUpdate) >= updateInterval;
}