use duration in peers

This commit is contained in:
fuwa
2019-11-26 13:24:10 +08:00
parent 165158b0a4
commit cc139a4064
+9 -1
View File
@@ -154,7 +154,15 @@ Future<List<dynamic>> getConnectionsSimple() async {
(k, v) {
if (k == 'connection_id') {
return MapEntry(k, v.substring(0, config.hashLength) + '...');
} else {
}
else if (k == 'live_time') {
final _duration = Duration(seconds: v);
format(Duration d) => d.toString().split('.').first.padLeft(8, "0");
return MapEntry(k, format(_duration));
}
else {
return MapEntry(k, v);
}
}