From e6a9c2252ddabf5dc4d48561d51448287815418e Mon Sep 17 00:00:00 2001 From: Adriana Draghici Date: Fri, 6 Nov 2009 16:56:05 +0000 Subject: [PATCH] updated canonical eta function; eta argument value in seconds Signed-off-by: Adriana Draghici --- auto/db/DatabaseWriter.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/auto/db/DatabaseWriter.py b/auto/db/DatabaseWriter.py index a1c5939..ab7a733 100644 --- a/auto/db/DatabaseWriter.py +++ b/auto/db/DatabaseWriter.py @@ -21,8 +21,10 @@ class DatabaseWriter: def add_status_message_datetime(self, cs_id, dt, peer_num, dht, download_speed, upload_speed, download_size, upload_size, eta_time): timestamp = float(julian.datetimeToJulian(dt)); - eta = datetime.timedelta(eta_time[0], eta_time[3], 0, 0, eta_time[2], eta_time[1], 0) - eta_seconds = eta.days * 24 * 3600 + eta.seconds + # adriana >:) + #eta = datetime.timedelta(eta_time[0], eta_time[3], 0, 0, eta_time[2], eta_time[1], 0) + #eta_seconds = eta.days * 24 * 3600 + eta.seconds + eta_seconds = eta_time #!!! already in seconds (tribler's fault) !!!! self.dba.insert_status_messages(cs_id, timestamp, peer_num, dht, download_speed, upload_speed, download_size, upload_size, eta_seconds) def add_verbose_message(self, cs_id, date, time, peer_ip, peer_port, message_type, index, begin, length, listen_port): -- 2.20.1