Blob Blame Raw

#include <cstdio>
#include <ctime>

#include <chrono>

#include "common.h"



void Address::print() const
	{ printf("%hhu.%hhu.%hhu.%hhu:%hu", ip[0], ip[1], ip[2], ip[3], port); }


Time monotonicTime() {
	return std::chrono::duration_cast<std::chrono::microseconds>(
		std::chrono::steady_clock::now().time_since_epoch() ).count();
}


Time globalTime()
	{ return time(NULL)*1000000ull; }