def run(self):
    self.real_offset = time.time()
    self.model_offset = self.function()
    t = self.model_offset
    self.execute = True
    while self.execute:
        if self.realTime:
            real = (self.scaling * (time.time() - self.real_offset))
            model = (t - self.model_offset)
            deltaT = (model - real)
            if (deltaT > 0):
                time.sleep(deltaT)
        t = self.function()
def run(self):
    self.real_offset = time.time()
    self.model_offset = self.function()
    t = self.model_offset
    self.execute = True
    while self.execute:
        if self.realTime:
            real = (self.scaling * (time.time() - self.real_offset))
            model = (t - self.model_offset)
            deltaT = (model - real)
            if (deltaT > 0):
                time.sleep(deltaT)
        t = self.function()