How does ADC time relate to real time?

I have a question on how the ADC samples are related to “real” time.

In the Tool.cpp the time is retrieved from the kernel with Tools::GetTime64(). This is used in AnalyzerSoft.cpp just before retrieving samples. (Service/Source/Analyzers/Soft/AnalyzerSoft.cpp · master · Zred / openZmeter · GitLab) Here I get confused. The time is used in the aggregation function pAggreg200MS function with Timestamp() but it is not related to the Start variable created in line 203.

In the device code (e.g. DeviceV2.cpp) the time seems never to be attributed to the samples.

I am just not sure where the samples coming from the ADC are actually related to time? Is it in pFFTs? Is there an offset between capture and timestamping?

Hi, the time assigned in AnalyzerSoft.cpp:203 is used ONLY to calculate the time used to analyze the block. In DeviceV2 the time function is used ONLY to control the time between transfers.

The real block time assignament is in AnalyzerSoftBlock.cpp:24

Samples are streamed from USB device and readed by the driverV1/V2, samples are routed to analyzersoft. In AnalyzerSoft, ZeroCrossing is responsible to group samples into blocks. On block creation system time is assigned. This time is lately used in aggregations.