summaryrefslogtreecommitdiffstats
path: root/txr.1
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2014-08-01 22:13:11 -0700
committerKaz Kylheku <kaz@kylheku.com>2014-08-01 22:13:11 -0700
commit404e5c4091c607a39d28b651063da9bdc7ebb3bb (patch)
tree0ff839db2e4d40c86918c423538ec617da24560e /txr.1
parent3c616876604219141ad1088e372c91928508f089 (diff)
downloadtxr-404e5c4091c607a39d28b651063da9bdc7ebb3bb.tar.gz
txr-404e5c4091c607a39d28b651063da9bdc7ebb3bb.tar.bz2
txr-404e5c4091c607a39d28b651063da9bdc7ebb3bb.zip
* configure (have_sys_time): New variable.
Added check for setitimer/getitimer which also checks for <sys/time.h>. * signal.c (sig_init): Register itimer-real, itimer-virtual, itimer-prof variables and getitimer and setitimer functions. (tv_to_usec): New static function. (getitimer_wrap, setitimer_wrap): New functions. * signal.h (getitimer_wrap, setitimer_wrap): Declared. * txr.1: Documented itimers.
Diffstat (limited to 'txr.1')
-rw-r--r--txr.137
1 files changed, 37 insertions, 0 deletions
diff --git a/txr.1 b/txr.1
index 176d665c..2f9efc99 100644
--- a/txr.1
+++ b/txr.1
@@ -14608,6 +14608,43 @@ It is a wrapper for the POSIX kill function.
If the <signal> argument is omitted, it defaults to the same value as sig-term.
+.SH UNIX ITIMERS
+
+Itimers can be used in combination with signal handling to execute asynchronous
+actions. Itimers deliver one-time or periodic signals. For more information,
+consult the POSIX specification.
+
+.SS Variables itimer-real, itimer-virtual and itimer-prof
+
+.TP
+Description:
+
+These variables correspond to the POSIX constants ITIMER_REAL, ITIMER_VIRTUAL
+and ITIMER_PROF. Thir values are suitable as the <timer> argument of
+the getitimer and setitimer functions.
+
+.SS Functions getitimer and setitimer
+
+.TP
+Syntax:
+
+ (getitimer <timer>)
+ (setitimer <timer> <interval> <value>)
+
+.TP
+Description
+
+The getitimer function returns the current value of the specified timer,
+which must be itimer-real, itimer-virtual or itimer-prof.
+
+The current value consists of a list of two integer values, which
+represents microseconds. The first value is the timer interval,
+and the second value is the timer's current value.
+
+The setitimer function also retrieves the specified timer, exactly
+as getitimer. In addition, it stores a new value in the timer,
+which is given by the two arguments, expressed in microseconds.
+
.SH UNIX SYSLOG
On platforms where a Unix-like syslog API is available, TXR exports this