diff options
author | Steve Bennett <steveb@workware.net.au> | 2022-12-01 10:13:57 +1000 |
---|---|---|
committer | Steve Bennett <steveb@workware.net.au> | 2023-02-13 10:44:10 +1000 |
commit | a5ea6b096e9e9f9913ad860a847e3757580dd9e4 (patch) | |
tree | c3e317177151e3ad83e996ee198b28aff4765b03 /auto.def | |
parent | 4b26f0ec1fa38bcfc8b2bd500a9bef10372bb140 (diff) | |
download | jimtcl-a5ea6b096e9e9f9913ad860a847e3757580dd9e4.zip jimtcl-a5ea6b096e9e9f9913ad860a847e3757580dd9e4.tar.gz jimtcl-a5ea6b096e9e9f9913ad860a847e3757580dd9e4.tar.bz2 |
clock millis, time: now use monotonic raw time if possible
Instead of using all time, these commands now use a monotonically
increasing system timer so that they are not affected by time (e.g. ntp) adjustments.
(But not on Windows since it doesn't work reliably)
Fixes #240
Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'auto.def')
-rw-r--r-- | auto.def | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -251,7 +251,7 @@ cc-check-functions geteuid mkstemp isatty cc-check-functions regcomp waitpid sigaction sys_signame sys_siglist isascii cc-check-functions syslog opendir readlink sleep usleep pipe getaddrinfo utimes cc-check-functions shutdown socketpair link symlink fsync dup umask -cc-check-functions localtime gmtime strptime clock_gettime +cc-check-functions localtime gmtime strptime if {![cc-check-functions realpath]} { cc-check-functions _fullpath } @@ -534,6 +534,9 @@ if {[have-feature windows]} { set buildjimext 0 } } +} else { + # We don't trust any version of clock_gettime on windows + cc-check-functions clock_gettime } if {[have-feature termios.h]} { lappend extra_objs jim-tty.o |