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 /txr.1 | |
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 'txr.1')
-rw-r--r-- | txr.1 | 17 |
1 files changed, 16 insertions, 1 deletions
@@ -55976,10 +55976,11 @@ parameter, which defaults to the value of .codn *random-state* . .SS* Time -.coNP Functions @ time and @ time-usec +.coNP Functions @, time @ time-usec and @ time-nsec .synb .mets (time) .mets (time-usec) +.mets (time-nsec) .syne .desc The @@ -55998,6 +55999,20 @@ field holds the seconds measured in the same way, and whose field extends the precision by giving number of microseconds as an integer value between 0 and 999999. +The +.code time-nsec +function is similar to +.code time-usec +except that the returned cons cell's +.code cdr +field gives a number of nanoseconds as an integer value +between 0 and 999999999. + +Note: on hosts where obtaining nanosecond precision is not available, the +.code time-nsec +function obtains a microseconds value instead, and multiplies +it by 1000. + .coNP Functions @ time-string-local and @ time-string-utc .synb .mets (time-string-local < time << format ) |