mirror of
https://github.com/data61/MP-SPDZ.git
synced 2026-04-20 03:01:31 -04:00
38 lines
853 B
C++
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_ */
|