How to start a thread in python after waiting for a specific delay
<p>i have functions detection(),timeralg()</p>

<p>while running the timeralg() function, i want detection() to start in parallel after a specific delay.
currently i tried like this</p>

<pre><code>def timeralg(c1,c2,c3,c4):
    t=[4,4,4,6,6,20,24,28,32,36,40]#delay determining array
    for y in range(0,3):
        print 'y is ',y
        if((c1&gt;=c2)and(c1&gt;=c3)):
            print 'timer1 on for'
            x=t[c1]        
            print x
            c1=0

        GPIO.output(5,False)#Red1
        GPIO.output(13,True)#red2
        GPIO.output(12,True)#red3
        GPIO.output(7,True)#green1
        if(y==2):
            t = threading.Thread(detection())
            t.start()
            print 'processing strtd in from 1'

        time.sleep(x-3)
        GPIO.output(7,False)
        GPIO.output(3,True)#Yellow1
        time.sleep(3)
        GPIO.output(3,False)#Yellow1
        GPIO.output(5,True)#Red1
</code></pre>

<p>Unlike this i want 't' to start after a specific delay specified by me.</p>