提交 5b530599 编写于 作者: M manjaro-xfce

Add tm stamp

上级 65911571
......@@ -116,6 +116,7 @@ int runSend()
fprintf(stderr, "Input :");
// Actual streaming, TX Threading
time_t tm_idle = time(0);
while (!stop_signal_called) {
bool has_data = false;
char cha = 0;
......@@ -156,6 +157,7 @@ int runSend()
total_sent += num_samps_sent;
}
}
tm_idle = time(0);
}
else
{
......@@ -176,6 +178,16 @@ int runSend()
1, &num_samps_sent));
total_sent += num_samps_sent;
}
if (tm_idle + 10 < time(0))
{
tm_idle = time(0);
char buf_tm[256];
sprintf(buf_tm,"%d",tm_idle);
int sl = strlen(buf_tm);
mtx_data.lock();
std::copy(buf_tm,buf_tm+sl,std::back_inserter(lst_data));
mtx_data.unlock();
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册