Some more changes

* new tag - $tstime
* add summand parameter to float formatter
* drop version.h includes since it has been moved to awdebug.h (e.g. to
  introduce BUILD_FUTURE guards easy in the future)
This commit is contained in:
2016-05-06 01:22:59 +03:00
parent 2220ad6bfe
commit 13f2d560d0
18 changed files with 36 additions and 19 deletions

View File

@ -139,6 +139,10 @@ QString AWKeysAggregator::formatter(const QVariant &data,
case FormatterType::TimeShort:
output = loc.toString(data.toDateTime(), QLocale::ShortFormat);
break;
case FormatterType::Timestamp:
output = QString("%1").arg(
data.toDateTime().toMSecsSinceEpoch() / 1000.0, 10, 'f', 0);
break;
case FormatterType::Uptime:
case FormatterType::UptimeCustom:
output =
@ -537,6 +541,9 @@ QStringList AWKeysAggregator::registerSource(const QString &source,
// short time
m_map.insertMulti(source, QString("shorttime"));
m_formatter[QString("shorttime")] = FormatterType::TimeShort;
// timestamp
m_map.insertMulti(source, QString("tstime"));
m_formatter[QString("tstime")] = FormatterType::Timestamp;
} else if (source == QString("system/uptime")) {
// uptime
m_map[source] = QString("uptime");