From 5526c4e2985652c6982f896e3b17135f7865f986 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Mon, 4 Oct 2004 13:37:46 +0000 Subject: [PATCH] Added elapsed command. --- plugins/Time.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/plugins/Time.py b/plugins/Time.py index f7b018a28..12b2b514b 100644 --- a/plugins/Time.py +++ b/plugins/Time.py @@ -46,7 +46,7 @@ import dateutil.parser import supybot.conf as conf import supybot.utils as utils -from supybot.commands import wrap +from supybot.commands import * import supybot.privmsgs as privmsgs import supybot.registry as registry import supybot.callbacks as callbacks @@ -178,6 +178,15 @@ class Time(callbacks.Privmsg): irc.reply(time.strftime(format, time.localtime(seconds))) time = wrap(time, ['channel?', 'nonInt?', ('?int', TIME.time)]) + def elapsed(self, irc, msg, args, seconds): + """ + + Returns a pretty string that is the amount of time represented by + . + """ + irc.reply(utils.timeElapsed(seconds)) + elapsed = wrap(elapsed, ['int']) + Class = Time