diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2020-10-07 07:28:43 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2020-10-07 07:28:43 -0700 |
commit | 59f8d2082b2687669d0ec55213776456bfde9506 (patch) | |
tree | acf8c1c80989f6ed481c066704ccdcef0c04a89f /configure | |
parent | dff49e8198641254308cf77cc953742acd5ad935 (diff) | |
download | txr-59f8d2082b2687669d0ec55213776456bfde9506.tar.gz txr-59f8d2082b2687669d0ec55213776456bfde9506.tar.bz2 txr-59f8d2082b2687669d0ec55213776456bfde9506.zip |
New function: time-nsec.
* configure: Test for clock_gettime, generating
HAVE_CLOCK_GETTIME symbol in config.h.
* time.c (time_sec_nsec): New function.
(time_init): time-nsec intrinsic registered.
* time.h (time_sec_nsec): Declared.
* txr.1: Documented.
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 20 |
1 files changed, 20 insertions, 0 deletions
@@ -3593,6 +3593,26 @@ else printf "no\n" fi +printf "Checking for clock_gettime ... " +cat > conftest.c <<! +#include <time.h> + +int main(void) +{ + struct timespec ts; + (void) clock_gettime(CLOCK_REALTIME, &ts); + return 0; +} +! + +if conftest ; then + printf "yes\n" + printf "#define HAVE_CLOCK_GETTIME 1\n" >> config.h + have_sys_types=y +else + printf "no\n" +fi + printf "Checking for loff_t ... " cat > conftest.c <<! #include <sys/types.h> |