(tolerance)
return val,msg
check if  informations in mongodb  is uptodate for 
        tolerance is an interger : for example 60000 for 1 minute
check if  informations in mongodb  is uptodate for 
        tolerance is an interger : for example 60000 for 1 minute
check if informations in mongodb is uptodate for tolerance is an interger : for example 60000 for 1 minute
def sysprobeis_uptodate(tolerance):
    '''
        check if  informations in mongodb  is uptodate for 
        tolerance is an interger : for example 60000 for 1 minute
    '''
    val=0

    coll=database["sysprobe"]
    cursor=coll.find()
    curtim= int(round(time.time() * 1000))
    val = 0
    msg= ""
    for item in cursor:
	res=item["timestamp"]
        diff=curtim - res
    	if diff > tolerance:
        	val=2
		msg = msg + " " +item["_id"]
    return val,msg
def sysprobeis_uptodate ( tolerance ) : val = 0 coll = database [ "sysprobe" ] cursor = coll . find ( ) curtim = int ( round ( time . time ( ) * 1000 ) ) val = 0 msg = "" for item in cursor : res = item [ "timestamp" ] diff = curtim - res if diff > tolerance : val = 2 msg = msg + " " + item [ "_id" ] return val , msg