From 404e5c4091c607a39d28b651063da9bdc7ebb3bb Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 1 Aug 2014 22:13:11 -0700 Subject: * configure (have_sys_time): New variable. Added check for setitimer/getitimer which also checks for . * 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. --- txr.1 | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) (limited to 'txr.1') 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 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 argument of +the getitimer and setitimer functions. + +.SS Functions getitimer and setitimer + +.TP +Syntax: + + (getitimer ) + (setitimer ) + +.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 -- cgit v1.2.3