#include #include "sigcx/timeval.h" using namespace SigCX; using namespace std; ostream& operator<<(ostream& os, const TimeVal& tv) { os << "(" << tv.tv_sec << ", " << tv.tv_usec << ")"; return os; } int main() { TimeVal tv1(1, 100), tv2(-1, 300); cout << tv1 << " + " << tv2 << " = " << tv1 + tv2 << endl; cout << tv1 << " - " << tv2 << " = " << tv1 - tv2 << endl; return 0; }