aboutsummaryrefslogtreecommitdiffstats
path: root/icnet/transport/icnet_transport_rate_estimation.cc
diff options
context:
space:
mode:
Diffstat (limited to 'icnet/transport/icnet_transport_rate_estimation.cc')
-rw-r--r--icnet/transport/icnet_transport_rate_estimation.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/icnet/transport/icnet_transport_rate_estimation.cc b/icnet/transport/icnet_transport_rate_estimation.cc
index 4c2d68c3..c9b34fdb 100644
--- a/icnet/transport/icnet_transport_rate_estimation.cc
+++ b/icnet/transport/icnet_transport_rate_estimation.cc
@@ -198,9 +198,9 @@ void SimpleEstimator::onDownloadFinished() {
gettimeofday(&end, 0);
double delay = RaaqmDataPath::getMicroSeconds(end) - RaaqmDataPath::getMicroSeconds(this->start_time_);
- //if(observer_) {
- // observer_->notifyDownloadTime(delay);
- //}
+ if(observer_) {
+ observer_->notifyDownloadTime(delay);
+ }
if (!this->estimated_) {
//Assuming all packets carry max_packet_size_ bytes of data (8*max_packet_size_ bits); 1000000 factor to convert us to seconds
if (this->estimation_) {
@@ -213,6 +213,7 @@ void SimpleEstimator::onDownloadFinished() {
}
this->alpha_ = this->base_alpha_ * (((double) this->number_of_packets_) / ((double) this->batching_param_));
} else {
+ delay = RaaqmDataPath::getMicroSeconds(end) - RaaqmDataPath::getMicroSeconds(this->begin_batch_);
if (this->number_of_packets_ >= (int) (75.0 * (double) this->batching_param_ / 100.0)) {
//Assuming all packets carry max_packet_size_ bytes of data (8*max_packet_size_ bits); 1000000 factor to convert us to seconds
if (this->estimation_) {