3~4ms temporal interval between event callbacks

3~4ms temporal interval between event callbacks

I'm testing the speed of callbacks using the following code: (the whole code is based on your hal sample)
  if (i_cddecoder) {
        // Register a lambda function to be called on every CD events
       auto start_t=std::chrono::system_clock::now();
        // Register a lambda function to be called on every CD events
        i_cddecoder->add_event_buffer_callback(
            [&](const Metavision::EventCD *begin, const Metavision::EventCD *end) {
             auto end_t=std::chrono::system_clock::now();
        std::cout<<"ns since last cb"<<(end_t-start_t).count()<<std::endl;
        start_t=end_t;
                event_analyzer.process_events(begin, end);
            });
    }
And the result is like follows
ns since last cb2859833
ns since last cb34360
ns since last cb36492
ns since last cb2953112
ns since last cb15027
ns since last cb9609
ns since last cb2979459
ns since last cb16453
ns since last cb9750
ns since last cb2912769
ns since last cb17931
ns since last cb13567
ns since last cb3009747
ns since last cb16337
ns since last cb12202
ns since last cb3046151
ns since last cb16757
ns since last cb12200
ns since last cb2915293
ns since last cb16387
ns since last cb11930
There are regularly  3~4ms intervals between event callback . Seems to me there is a buffer flushed every 4 ms or so. Is this a recognized problem?

I tried with a EVK3 and a EVK4, on two different PCs with ubuntu20.04. The results are basically the same.
    As a Prophesee customer, join the community conversation. 
    Request your free access today.

      Information

      In this Community Forum, you can discuss products, technology and applications. Only registred users can post but everyone can read. To ask a private question, enter a support ticket in My Area https://support.prophesee.ai/portal/en/newticket