# HG changeset patch
# User Andrey Skvortsov <andrej.skvortzov@gmail.com>
# Date 1527844897 -10800
# Node ID d1536c27186641054f18b28409f2b843d3644339
# Parent  ce5bd74ed55269ffdc19109930cc98b20209b1a8
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.

diff -r ce5bd74ed552 -r d1536c271866 targets/Linux/plc_Linux_main.c
--- 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__);