Change "recent" to be 10s from 60s, and in its own variable

pull/8/head
Lauri Kasanen 5 years ago
parent 1db77ee6bd
commit 80513c8616

@ -1303,10 +1303,12 @@ void VNCSConnectionST::screenLayoutChange(rdr::U16 reason)
cp.screenLayout); cp.screenLayout);
} }
static const unsigned recentSecs = 10;
static void pruneStatList(std::list<struct timeval> &list, const struct timeval &now) { static void pruneStatList(std::list<struct timeval> &list, const struct timeval &now) {
std::list<struct timeval>::iterator it; std::list<struct timeval>::iterator it;
for (it = list.begin(); it != list.end(); ) { for (it = list.begin(); it != list.end(); ) {
if ((*it).tv_sec + 60 < now.tv_sec) if ((*it).tv_sec + recentSecs < now.tv_sec)
it = list.erase(it); it = list.erase(it);
else else
it++; it++;

Loading…
Cancel
Save