From: Adriana Draghici Date: Fri, 6 Nov 2009 16:57:57 +0000 (+0000) Subject: Libtorrent: updated canonical eta function; returns eta in seconds X-Git-Tag: getopt_long~271 X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=commitdiff_plain;h=db142455cbbd65affdd4590c9d88f5a2da8663c2;p=cs-p2p-next.git Libtorrent: updated canonical eta function; returns eta in seconds Signed-off-by: Adriana Draghici --- diff --git a/log-parser/libtorrent/StatusParser.py b/log-parser/libtorrent/StatusParser.py index e83c4b1..30f1f29 100644 --- a/log-parser/libtorrent/StatusParser.py +++ b/log-parser/libtorrent/StatusParser.py @@ -59,7 +59,12 @@ def libtorrent_canon_eta(non_canon_value): eta.append(int(eta_string_array[i])) for i in range(len(eta_string_array), 4): eta.insert(0, 0) - return eta + + # adriana >:) + eta2 = datetime.timedelta(eta[0], eta[3], 0, 0, eta[2], eta[1], 0) + eta_seconds = eta.days * 24 * 3600 + eta.seconds + return eta_seconds + #return eta # # sample libtorrent status line