Faced with the problem of displaying the time. For my task, it is necessary to accurately measure time intervals, the higher the accuracy, the better. I wanted to work with milliseconds. But I ran into the problem of how to get and analyze the exact time. Here is the code that gives strange results.
As a result, I get in the log window
Why are the last three decimal places in seconds different from the original data?
Millisec:
Stime=DateTime.Now()
.......
DateTime.TimeFormat="HH:mm:ss.sss"
miliSec=STime Mod 1000
Log("Time " & DateTime.Time(STime) & " Signal " & STime & " MiliSec " & miliSec )
Why are the last three decimal places in seconds different from the original data?