code: def add_sync_callback(self, callback_cycles, callback):
          
          self.sync_callbacks_cyles[callback] = 0
          self.sync_callbacks.append([callback_cycles, callback])
          if self.quickest_sync_callback_cycles is None or \
                          self.quickest_sync_callback_cycles > callback_cycles:
              self.quickest_sync_callback_cycles = callback_cycles
docs: Add a CPU cycle triggered callback