Csock: able use non-int number of secs for timer.

This patch happened in upstream csocket too, so update won't break
anything.
This commit is contained in:
Alexey Sokolov
2012-03-20 08:49:59 +07:00
parent 27bebf1ca4
commit 3aa6b581fc
3 changed files with 80 additions and 39 deletions

View File

@@ -303,10 +303,11 @@ void CModule::ListTimers() {
for (it = m_sTimers.begin(); it != m_sTimers.end(); ++it) {
CTimer* pTimer = *it;
unsigned int uCycles = pTimer->GetCyclesLeft();
timeval Interval = pTimer->GetInterval();
Table.AddRow();
Table.SetCell("Name", pTimer->GetName());
Table.SetCell("Secs", CString(pTimer->GetInterval()));
Table.SetCell("Secs", CString(Interval.tv_sec) + "seconds" + (Interval.tv_usec ? " " + CString(Interval.tv_usec) + " microseconds" : ""));
Table.SetCell("Cycles", ((uCycles) ? CString(uCycles) : "INF"));
Table.SetCell("Description", pTimer->GetDescription());
}