Skip to content

Commit

Permalink
nit: rename duration to secondsSinceDisconnect
Browse files Browse the repository at this point in the history
  • Loading branch information
pajlada committed Dec 9, 2023
1 parent dc9985d commit 3d7d65c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/providers/twitch/TwitchChannel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1200,10 +1200,12 @@ void TwitchChannel::loadRecentMessagesReconnect()
// calculate how many messages could have occured
// while we were not connected to the channel
// assuming a maximum of 10 messages per second
const auto duration = std::chrono::duration_cast<std::chrono::seconds>(
now - this->disconnectedAt_.value())
.count();
limit = std::min(static_cast<int>(duration + 1) * 10, limit);
const auto secondsSinceDisconnect =
std::chrono::duration_cast<std::chrono::seconds>(
now - this->disconnectedAt_.value())
.count();
limit =
std::min(static_cast<int>(secondsSinceDisconnect + 1) * 10, limit);
}

auto weak = weakOf<Channel>(this);
Expand Down

0 comments on commit 3d7d65c

Please sign in to comment.