Hello,
I think the key is, that you consider the graph update (the GUI) is not drawn in real time!
This means, your data come in every 2 ms and you trigger an update. The update of the GUI might happen immediately or it might happen some milliseconds later. Thus, you have to collect (queue) your data and once the GUI update happens, you draw all data that are recorded since the last update.
As a result, you can update every second or 10 times per second or 50 times per second, the graph on the screen shows always the same number of data per second.
Does this help?
Please have a look into the PatientMonitor demo - it demonstrates these aspects.
Best regards,
Manfred.