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