Fix timestamp not showing on every message at STDOUT

This commit is contained in:
Manolis Surligas 2018-03-20 20:37:23 +02:00
parent 2fb1bfadfc
commit c1dc11fe4e
1 changed files with 2 additions and 1 deletions

View File

@ -95,7 +95,8 @@ namespace gr
if(d_timestamp) {
std::time_t t = std::time(nullptr);
std::tm tm = *std::localtime(&t);
d_fos << "[" << strftime(buf, sizeof(buf), "%F %T %z", &tm) << "]";
strftime(buf, sizeof(buf), "%F %T %z", &tm);
std::cout << "[" << buf << "]";
}
switch (d_format)