I’m writing a simple c# program to save some csv data in a while loop. The time required for ExportData2 seems to increase with each call. Starts at about 300 ms, next call 600ms, 900 and so on. Any idea how to get around this?
while (true)
{
if (sample_count % 2 == 0)
{
export_settings.FileName = folder_path + “cso_capture1”;
}
else
{
export_settings.FileName = folder_path + “cso_capture2”;
}
sample_count++;
Client.SetCaptureSeconds(5);
Client.Capture(); //blocks until capture is complete, but processing is not complete.
watch.Start();
if (Client.BlockUntillProcessingCompleteOrTimeout(new TimeSpan(0, 0, 5)) == false)
throw new Exception("processing took too long");
Client.ExportData2(export_settings, true, false);
watch.Stop();
Console.WriteLine($"Export Time: {watch.ElapsedMilliseconds} ms");
}