def runround(self):
        ''' Advance script time and move nodes.
        '''
        if self.state != self.STATE_RUNNING:
            return        
        t = self.lasttime
        self.lasttime = time.time()
        now = self.lasttime - self.timezero
        dt = self.lasttime - t
        #print "runround(now=%.2f, dt=%.2f)" % (now, dt)
        
        # keep current waypoints up-to-date
        self.updatepoints(now)
        
        if not len(self.points):
            if len(self.queue):
                # more future waypoints, allow time for self.lasttime update
                nexttime = self.queue[0].time - now
                if nexttime > (0.001 * self.refresh_ms):
                    nexttime -= (0.001 * self.refresh_ms)
                self.session.evq.add_event(nexttime, self.runround)
                return
            else:
                # no more waypoints or queued items, loop?
                if not self.empty_queue_stop:
                    # keep running every refresh_ms, even with empty queue
                    self.session.evq.add_event(0.001 * self.refresh_ms, self.runround)
                    return
                if not self.loopwaypoints():
                    return self.stop(move_initial=False)
                if not len(self.queue):
                    # prevent busy loop
                    return
                return self.run()
        
        # only move netifs attached to self.wlan, or all nodenum in script?
        moved = []
        moved_netifs = []
        for netif in self.wlan.netifs():
            node = netif.node
            if self.movenode(node, dt):
                moved.append(node)
                moved_netifs.append(netif)
        
        # calculate all ranges after moving nodes; this saves calculations
        #self.wlan.model.update(moved)
        self.session.mobility.updatewlans(moved, moved_netifs)
        
        # TODO: check session state
        self.session.evq.add_event(0.001 * self.refresh_ms, self.runround)
dataset/ETHPy150Open coreemu/core/daemon/core/mobility.py/WayPointMobility.runround/original