From 4b77d1a08db2a067d9f8f67c5458139e6bc122c6 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 24 Mar 2012 19:56:05 +0900 Subject: [PATCH] separate max timer and show timer options --- anki/cards.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/anki/cards.py b/anki/cards.py index 1f5073989..13bc6e2a5 100644 --- a/anki/cards.py +++ b/anki/cards.py @@ -137,10 +137,12 @@ lapses=?, left=?, odue=?, odid=?, did=? where id = ?""", def timeLimit(self): "Time limit for answering in milliseconds." conf = self.col.decks.confForDid(self.odid or self.did) - if not conf['timer']: - return 0 return conf['maxTaken']*1000 + def shouldShowTimer(self): + conf = self.col.decks.confForDid(self.odid or self.did) + return conf['timer'] + def timeTaken(self): "Time taken to answer card, in integer MS." total = int((time.time() - self.timerStarted)*1000)