I have been working on capturing encoder positions and logging it relative to real world UTC time.
I have the Linux operating system synced to a ptp time source but the only access to this time I have found is the C++ code "time()" which give time as an integer in seconds, is there a method to get sub second time from within C code, I am looking for at least millisecond resolution anything better would be a plus.
I have already tried to use "ftime()" but found it crashed the system.
any help here would be appreciated.
Regards
Steven