Skip to content

Commit

Permalink
[core] Fixed FormatTime subseconds
Browse files Browse the repository at this point in the history
  • Loading branch information
maxsharabayko committed Feb 10, 2021
1 parent 94077c3 commit 40943db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions srtcore/group.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3858,11 +3858,10 @@ void CUDTGroup::sendBackup_SilenceRedundantLinks(vector<gli_t>& w_parallel)
continue;
}
CUDT& ce = d->ps->core();
steady_clock::duration td(0);
if (!is_zero(ce.m_tsFreshActivation) && sendBackup_CheckRunningLinkStable(ce, currtime, d->weight) != 1)
{
HLOGC(gslog.Debug,
log << "... not silencing @" << d->id << ": too early: " << FormatDuration(td));
log << "... not silencing @" << d->id << ": too early");
continue;
}

Expand Down
2 changes: 1 addition & 1 deletion srtcore/sync.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ std::string FormatTime(const steady_clock::time_point& timestamp)
out << setfill('0') << setw(2) << hours << ":"
<< setfill('0') << setw(2) << minutes << ":"
<< setfill('0') << setw(2) << seconds << "."
<< setfill('0') << setw(decimals) << timestamp.time_since_epoch().count() << " [STDY]";
<< setfill('0') << setw(decimals) << (timestamp - seconds_from(total_sec)).time_since_epoch().count() << " [STDY]";
return out.str();
}

Expand Down

0 comments on commit 40943db

Please sign in to comment.