mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-02 17:29:22 +01:00
Added elapsed command.
This commit is contained in:
parent
16c4561da6
commit
5526c4e298
@ -46,7 +46,7 @@ import dateutil.parser
|
|||||||
|
|
||||||
import supybot.conf as conf
|
import supybot.conf as conf
|
||||||
import supybot.utils as utils
|
import supybot.utils as utils
|
||||||
from supybot.commands import wrap
|
from supybot.commands import *
|
||||||
import supybot.privmsgs as privmsgs
|
import supybot.privmsgs as privmsgs
|
||||||
import supybot.registry as registry
|
import supybot.registry as registry
|
||||||
import supybot.callbacks as callbacks
|
import supybot.callbacks as callbacks
|
||||||
@ -178,6 +178,15 @@ class Time(callbacks.Privmsg):
|
|||||||
irc.reply(time.strftime(format, time.localtime(seconds)))
|
irc.reply(time.strftime(format, time.localtime(seconds)))
|
||||||
time = wrap(time, ['channel?', 'nonInt?', ('?int', TIME.time)])
|
time = wrap(time, ['channel?', 'nonInt?', ('?int', TIME.time)])
|
||||||
|
|
||||||
|
def elapsed(self, irc, msg, args, seconds):
|
||||||
|
"""<seconds>
|
||||||
|
|
||||||
|
Returns a pretty string that is the amount of time represented by
|
||||||
|
<seconds>.
|
||||||
|
"""
|
||||||
|
irc.reply(utils.timeElapsed(seconds))
|
||||||
|
elapsed = wrap(elapsed, ['int'])
|
||||||
|
|
||||||
|
|
||||||
Class = Time
|
Class = Time
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user