Android Question Time Display Accuracy

Lakhtin_V

Active Member
Licensed User
Longtime User
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.
Millisec:
                        Stime=DateTime.Now()
                        .......
                        DateTime.TimeFormat="HH:mm:ss.sss"
                        miliSec=STime Mod 1000
                        Log("Time  " & DateTime.Time(STime) & "  Signal " & STime & "   MiliSec " & miliSec  )
As a result, I get in the log window
MiliSec.JPG

Why are the last three decimal places in seconds different from the original data?
 
Top