BeRo1985 / kraft

Kraft Physics Engine is an open source Object Pascal physics engine library that can be used in 3D games.
107 stars 21 forks source link

Fix Android time issue #20

Closed and3md closed 5 years ago

and3md commented 5 years ago

Android has three clocks (https://developer.android.com/reference/android/os/SystemClock.html). And clock used by fpgettimeofday can leaps forward or backward. We had this issue in CGE too (https://github.com/castle-engine/castle-engine/pull/132). The solution is to use clock_gettime More info: https://stackoverflow.com/questions/3832097/how-to-get-the-current-time-in-native-android-code