beremiz

d1536c271866
Parents ce5bd74ed552
Children 9fa5be79bb77
use CLOCK_MONOTONIC instead of CLOCK_REALTIME for timer setup

CLOCK_REALTIME is a wall clock, that could change back and forth (user
changes system time, winter/summer time, NTP corrections and so on).
For real-time application CLOCK_MONOTONIC should be used, it doesn't
have such jumps.
--- a/targets/Linux/plc_Linux_main.c Thu May 31 13:07:10 2018 +0300
+++ b/targets/Linux/plc_Linux_main.c Fri Jun 01 12:21:37 2018 +0300
@@ -117,7 +117,7 @@
pthread_mutex_lock(&debug_wait_mutex);
pthread_mutex_lock(&python_wait_mutex);
- timer_create (CLOCK_REALTIME, &sigev, &PLC_timer);
+ timer_create (CLOCK_MONOTONIC, &sigev, &PLC_timer);
if( __init(argc,argv) == 0 ){
PLC_SetTimer(common_ticktime__,common_ticktime__);