use duration in peers

pull/2/head
fuwa 4 years ago
parent 165158b0a4
commit cc139a4064

@ -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);
}
}