Files
MP-SPDZ/Tools/TimerWithComm.h
2025-05-30 13:35:02 +10:00

38 lines
853 B
C++

/*
* TimerWithComm.h
*
*/
#ifndef TOOLS_TIMERWITHCOMM_H_
#define TOOLS_TIMERWITHCOMM_H_
#include "time-func.h"
#include "Networking/Player.h"
class TimerWithComm : public Timer
{
NamedCommStats total_stats, last_stats;
public:
TimerWithComm();
TimerWithComm(const Timer& other);
TimerWithComm(double time);
void start(const NamedCommStats& stats = {});
void stop(const NamedCommStats& stats = {});
double mb_sent() const;
size_t rounds() const;
TimerWithComm operator+(const TimerWithComm& other);
TimerWithComm operator-(const TimerWithComm& other);
TimerWithComm& operator+=(const TimerWithComm& other);
TimerWithComm& operator-=(const TimerWithComm& other);
string full();
friend ostream& operator<<(ostream& os, const TimerWithComm& stats);
};
#endif /* TOOLS_TIMERWITHCOMM_H_ */