from threading import Thread
from valeurs import *


class Scan(Thread):

    def __init__(self, valeur,verrou):
        Thread.__init__(self)
        
    def run(self):
        i=0
        while 1:
		#~ with verrou:
			tmp=valeur[i].getNewTaux()
			if tmp-valeur[i].getTaux() > 0.5:
				valeur[i].MiseEnVente()
			time.sleep(0.4)
			i=i+1
			if i<39:
				i=0
			
