/* The callback invoked by QemuTimer when a delayed event is ready to be emitted  */
static void monitor_protocol_event_handler(void *opaque)
/* The callback invoked by QemuTimer when a delayed event is ready to be emitted  */
static void monitor_protocol_event_handler(void *opaque)
{
    MonitorEventState *evstate = opaque;
    int64_t now = qemu_clock_get_ns(QEMU_CLOCK_REALTIME);
    trace_monitor_protocol_event_handler(evstate->event,
                                         evstate->data,
                                         evstate->last,
                                         now);
    if (evstate->data) {
        monitor_protocol_event_emit(evstate->event, evstate->data);
        qobject_decref(evstate->data);
        evstate->data = NULL;
    }
    evstate->last = now;
}