From 8439fdd3731ade5787200fbbffa8b3a79b7c7284 Mon Sep 17 00:00:00 2001 From: Hideaki Tai Date: Sat, 2 Jan 2021 16:07:10 +0900 Subject: [PATCH] improve a bit --- Artnet.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Artnet.h b/Artnet.h index 375a6d8..3651564 100644 --- a/Artnet.h +++ b/Artnet.h @@ -207,10 +207,10 @@ namespace arx { } void streaming(const String& ip, const uint32_t universe_) { + uint32_t now = millis(); if (intervals.find(universe_) == intervals.end()) { - intervals.insert(make_pair(universe_, millis())); + intervals.insert(make_pair(universe_, now)); } - uint32_t now = millis(); if (now >= intervals[universe_] + DEFAULT_INTERVAL_MS) { set_universe(universe_); send_packet(ip);