Files
MP-SPDZ/Tools/TimerWithComm.h
Marcel Keller 6cc3fccef0 Maintenance.
2023-05-09 14:50:53 +10:00

37 lines
821 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);
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_ */