I'm using the Control Runtime for Linux x86. On my System (C/C++ Apps) I use the monotonic timer for time measurements ( clock_gettime(CLOCK_MONOTONIC, ×tamp).
In my CODESYS Project I want also have access to the monotonic timer of my system. So is it possible to use the same timer in codesys and in my c/c++ system application? I would like to have a common time base and match the test results.
Thanks in advance
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This should be SysTimeGetUs()
I think some systems have a different CLOCK_MONOTONIC per core, so perhaps you will need to have the time calls on the same core. Perhaps not.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello all,
I'm using the Control Runtime for Linux x86. On my System (C/C++ Apps) I use the monotonic timer for time measurements ( clock_gettime(CLOCK_MONOTONIC, ×tamp).
In my CODESYS Project I want also have access to the monotonic timer of my system. So is it possible to use the same timer in codesys and in my c/c++ system application? I would like to have a common time base and match the test results.
Thanks in advance
This should be SysTimeGetUs()
I think some systems have a different CLOCK_MONOTONIC per core, so perhaps you will need to have the time calls on the same core. Perhaps not.
Thanks. I will check this. I need nano seconds, then I think it will be SysTimeGetNs()