prevent the main loop spinning too fast

def on_idle(self, event):
        '''prevent the main loop spinning too fast'''
        state = self.state
        now = time.time()
        if now - self.last_layout_send > 1:
            self.last_layout_send = now
            state.out_queue.put(win_layout.get_wx_window_layout(self))
        time.sleep(0.1)