Files
MP-SPDZ/Tools/TimerWithComm.cpp
Marcel Keller e07d9bf2a3 Maintenance.
2022-01-11 16:05:26 +11:00

24 lines
353 B
C++

/*
* TimerWithComm.cpp
*
*/
#include "TimerWithComm.h"
void TimerWithComm::start(const NamedCommStats& stats)
{
Timer::start();
last_stats = stats;
}
void TimerWithComm::stop(const NamedCommStats& stats)
{
Timer::stop();
total_stats += stats - last_stats;
}
double TimerWithComm::mb_sent()
{
return total_stats.sent * 1e-6;
}