Skip to content
Snippets Groups Projects
Commit f144b130 authored by Nicolas Pope's avatar Nicolas Pope
Browse files

Attempt to improve latency values

parent 1759fcdd
No related branches found
No related tags found
1 merge request!316Resolves #343 GUI and Frame Refactor
Pipeline #28600 passed
......@@ -128,6 +128,7 @@ static void run(ftl::Configurable *root) {
net->shutdown();
LOG(INFO) << "Stopping...";
ftl::timer::stop(true);
LOG(INFO) << "Timer stopped...";
ftl::pool.stop(true);
LOG(INFO) << "All threads stopped.";
......
......@@ -104,7 +104,7 @@ bool Net::post(const ftl::codecs::StreamPacket &spkt, const ftl::codecs::Packet
try {
// FIXME: This doesn't work for file sources with file relative timestamps...
short pre_transmit_latency = short(ftl::timer::get_time() - spkt.timestamp);
short pre_transmit_latency = short(ftl::timer::get_time() - spkt.localTimestamp);
if (!net_->send(client.peerid,
base_uri_,
......@@ -125,7 +125,7 @@ bool Net::post(const ftl::codecs::StreamPacket &spkt, const ftl::codecs::Packet
}
} else {
try {
short pre_transmit_latency = short(ftl::timer::get_time() - spkt.timestamp);
short pre_transmit_latency = short(ftl::timer::get_time() - spkt.localTimestamp);
if (!net_->send(peer_,
base_uri_,
pre_transmit_latency, // Time since timestamp for tx
......@@ -170,7 +170,7 @@ bool Net::begin() {
StreamPacket spkt = spkt_raw;
// FIXME: see #335
//spkt.timestamp -= clock_adjust_;
spkt.localTimestamp = now - ttimeoff;
spkt.localTimestamp = now - int64_t(ttimeoff);
spkt.hint_capability = 0;
spkt.hint_source_total = 0;
//LOG(INFO) << "LATENCY: " << ftl::timer::get_time() - spkt.localTimestamp() << " : " << spkt.timestamp << " - " << clock_adjust_;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment