blob: 6f6555aeaaca4635327377a07e2dcd5d5ee0076c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#include <thread>
#include <iostream>
#include "common.h"
using namespace std::literals;
int main()
{
namespace CH = std::chrono;
auto logf = LogFile();
refstream stream = std::ref(std::cout);
while(1) {
logf.change(stream);
auto epoch = CH::duration_cast<CH::seconds>(
CH::system_clock::now().time_since_epoch()
).count();
stream.get() << "begin\t" << epoch << std::endl;
stream.get() << "ver\t" << APP_MAJOR << "\t" << APP_MINOR << std::endl;
stream.get() << dumpReport();
stream.get() << "end\t" << epoch << std::endl;
std::this_thread::sleep_for(1min);
}
return 0;
}
|