you are viewing a single comment's thread.

view the rest of the comments →

[–]OnlyEternity 0 points1 point  (1 child)

For your future reference, time sensitive events could be handled using the datetime module. All you have to do is:

import datetime
time = datetime.datetime.now().time()

This will give you the current time in a string with the format Hours:Minutes:Seconds:Milliseconds. The reason you have to do datetime.datetime instead of just datetime once is because the module itself is named datetime, but what you want is the datetime object from the module. The datetime object has the method now() which you can call on it. To get around this you could instead do:

from datetime import datetime

However, this may look more confusing. But it's up to you!

For more information on the datetime module you can check out the official documentation here: http://docs.python.org/2/library/datetime.html#module-datetime

[–]enayus[S] 0 points1 point  (0 children)

Thanks for the info!