mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-04 04:44:32 +02:00
Merge branch 'atp' of https://github.com/birarda/hifi into protocol
This commit is contained in:
commit
7bfc9f7fd1
2 changed files with 5 additions and 4 deletions
|
@ -250,7 +250,7 @@ void SendQueue::run() {
|
|||
|
||||
// sleep as long as we need until next packet send, if we can
|
||||
auto now = high_resolution_clock::now();
|
||||
auto microsecondDuration = (_lastSendTimestamp + microseconds(_packetSendPeriod)) - now;
|
||||
auto microsecondDuration = duration_cast<microseconds>((_lastSendTimestamp + microseconds(_packetSendPeriod)) - now);
|
||||
|
||||
if (microsecondDuration.count() > 0) {
|
||||
usleep(microsecondDuration.count());
|
||||
|
|
|
@ -44,7 +44,7 @@ const QCommandLineOption UNRELIABLE_PACKETS {
|
|||
const QStringList STATS_TABLE_HEADERS {
|
||||
"Send Rate (P/s)", "RTT(ms)", "CW (P)", "Send Period (us)",
|
||||
"Received ACK", "Processed ACK", "Received LACK", "Received NAK", "Received TNAK",
|
||||
"Sent ACK2", "Re-sent Packets"
|
||||
"Sent ACK2", "Sent Packets", "Re-sent Packets"
|
||||
};
|
||||
|
||||
UDTTest::UDTTest(int& argc, char** argv) :
|
||||
|
@ -123,8 +123,8 @@ UDTTest::UDTTest(int& argc, char** argv) :
|
|||
if (!_target.isNull()) {
|
||||
sendInitialPackets();
|
||||
|
||||
// the sender reports stats every 1 second
|
||||
static const int STATS_SAMPLE_INTERVAL = 1000;
|
||||
// the sender reports stats every 100ms
|
||||
static const int STATS_SAMPLE_INTERVAL = 100;
|
||||
|
||||
QTimer* statsTimer = new QTimer(this);
|
||||
connect(statsTimer, &QTimer::timeout, this, &UDTTest::sampleStats);
|
||||
|
@ -234,6 +234,7 @@ void UDTTest::sampleStats() {
|
|||
QString::number(stats.events[udt::ConnectionStats::Stats::ReceivedNAK]).leftJustified(STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||
QString::number(stats.events[udt::ConnectionStats::Stats::ReceivedTimeoutNAK]).leftJustified(STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||
QString::number(stats.events[udt::ConnectionStats::Stats::SentACK2]).leftJustified(STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||
QString::number(stats.sentPackets).leftJustified(STATS_TABLE_HEADERS[++headerIndex].size()),
|
||||
QString::number(stats.events[udt::ConnectionStats::Stats::Retransmission]).leftJustified(STATS_TABLE_HEADERS[++headerIndex].size())
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue