Send a message THROUGH TIME in Python (joke)
Who says time travel isn’t possible?
import time def send_to_future(message, seconds): time.sleep(seconds) return message
I’ll leave it up to someone else to write the send_to_past() function. ;-)
Who says time travel isn’t possible?
import time def send_to_future(message, seconds): time.sleep(seconds) return message
I’ll leave it up to someone else to write the send_to_past() function. ;-)
ferringb wrote,
Should’ve used deferreds… they fit the joke better ;)
Juho Vepsäläinen wrote,
Perhaps something along
would do the trick. (Based on the idea that this moment is the past of the future.)
Marius Gedminas wrote,
Easy: just pass a negative number for seconds.
farmerjoe wrote,
For your send to past function, I suggest resetting the system clock to an earlier time.
Something on the order of
You can verify it works by: