mysteriously nonfunctioning script - very simple

Heiko Wundram modelnine at ceosg.de
Sat Mar 26 15:52:50 EST 2005


Am Samstag, 26. März 2005 19:47 schrieb Sean McIlroy:
> <snip>

Why not try the following:

>>> import datetime
>>> x = datetime.datetime.now()
>>> x
datetime.datetime(2005, 3, 26, 21, 48, 13, 495765)
>>> y = datetime.datetime(2005,3,26,21,50) # Wake me up today at 21:50
>>> y
datetime.datetime(2005, 3, 26, 21, 50, 13)
>>> time.sleep((y-x).days*60*60*24+(y-x).seconds+(y-x).microseconds*0.000001)
>>> print "I am past the timeout!"

-- 
--- Heiko.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/python-list/attachments/20050326/f70fdc5f/attachment.sig>


More information about the Python-list mailing list