Skip to content

Commit

Permalink
fix: fixed critical bug, where time elapsed was multiplied and meant …
Browse files Browse the repository at this point in the history
…it sent 1000x as many packets per second
  • Loading branch information
firecraftgaming committed Jun 13, 2024
1 parent 67eaf00 commit 1fc27ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/artnet/consumer/artnet_consumer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ struct artnet_consumer : public core::frame_consumer
long long elapsed_ms =
std::chrono::duration_cast<std::chrono::milliseconds>(elapsed_seconds).count();

long long sleep_time = time - elapsed_ms * 1000;
long long sleep_time = time - elapsed_ms;
if (sleep_time > 0)
std::this_thread::sleep_for(std::chrono::milliseconds(sleep_time));

Expand Down

0 comments on commit 1fc27ae

Please sign in to comment.