X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=bmusb%2Fbmusb.h;fp=bmusb%2Fbmusb.h;h=6aabd51fcc39f68c1b0780e24d5451319083b317;hb=c7466ef67f76efdd9e8a151e8d0f38281199c2a9;hp=f4af6aa14b2a1399168d3f75673b1d2215846770;hpb=1066d2975e1c824bef6b9c9555c7d9f4f1a890a9;p=bmusb diff --git a/bmusb/bmusb.h b/bmusb/bmusb.h index f4af6aa..6aabd51 100644 --- a/bmusb/bmusb.h +++ b/bmusb/bmusb.h @@ -4,6 +4,7 @@ #include #include #include +#include #include #include #include @@ -39,6 +40,14 @@ class FrameAllocator { // If so, and are still about the number of total bytes // so if size == 1024, there's 512 bytes in data and 512 in data2. bool interleaved = false; + + // At what point this frame was received. Note that this marks the + // _end_ of the frame being received, not the beginning. + // Thus, if you want to measure latency, you'll also need to include + // the time the frame actually took to transfer (usually 1/fps, + // ie., the frames are typically transferred in real time). + std::chrono::steady_clock::time_point received_timestamp = + std::chrono::steady_clock::time_point::min(); }; virtual ~FrameAllocator();