nou replied to the topic 'Timekeeping in INDI and KStars' in the forum. 2 weeks ago

How fast this drift happens? I looked at code and there SimClock class that seems to handle timekeeping. It use monotonic clock which means when it start it make store current time as startTime and how many milliseconds that monotonic clock show. Then it return time as startTime + elapsedTime from monotonic clock. As far I can tell there should be no accumulation error. Monotonic clock are not affected by change of system time. That mean KStars doesn't reflect on change of system clock.

So only disrepancy between KStars time and real time should come from drift in that monotonic clock. I wrote simple testing program that output difference between monotonic and system clock. Monotonic clock is running 10ms/hour faster than system clock.

Also I let run KStars for few hours and didn't observe any drift between kstars clock and system clock. So that 18 hours drift most likely mean some faulty hardware clock. Because 18 hours drift even over one month period means it drift 90 second per hour. I am pretty sure someone would notice such huge drift.

Read More...