Ejemplo n.º 1
0
 def __stopTimer(self):
     if self.__startTime != 0:
         totalTime = time.time() - self.__startTime
         totalTime = simu.real_time(totalTime)
         self.__latencies.append(totalTime)
         print("Took "+str(totalTime)+" seconds for "+ str(self.__wrapped.get_id()) + " Average: "+str(sum(self.__latencies)/float(len(self.__latencies))))
         self.__startTime = 0
Ejemplo n.º 2
0
 def __stopTimer(self, id_=0):
     if id_ in self.__startTime:
         totalTime = time.time() - self.__startTime[id_]
         totalTime = simu.real_time(totalTime)
         self.__latencies.append(totalTime)
         print("Took "+str(totalTime)+" seconds for client "+ str(self.__wrapped.get_id()) + " Video: "+str(id_)+" Average: "+str(sum(self.__latencies)/float(len(self.__latencies))))
         del self.__startTime[id_]
Ejemplo n.º 3
0
 def __stopTimer(self, packetid):
     if len(self.__startTime) > 0:
         #packetid = self.__wrapped.receivedData['responseTo']
         totalTime = time.time() - self.__startTime[packetid]
         totalTime = simu.real_time(totalTime)
         #self.__startTime.remove(packetid)
         del self.__startTime[packetid]
         self.__latencies.append(totalTime)
         print("Took "+str(totalTime)+" seconds for "+ str(self.__wrapped.get_id()) + " Average: "+str(sum(self.__latencies)/float(len(self.__latencies))))