from time import sleep
from threading import Timer

def setTimeout(f,t):
    Timer(t,f).start()
def test_function():
    print 'test'

setTimeout(test_function,2.5)
for i in range(5):
    print i
    sleep(1)