diff --git a/doc/posix.texi b/doc/posix.texi index a823bc360..4d4473422 100644 --- a/doc/posix.texi +++ b/doc/posix.texi @@ -10,7 +10,7 @@ * Time:: gettimeofday, localtime, strftime, etc. * Runtime Environment:: Accessing and modifying Guile's environment. * Processes:: getuid, getpid, etc. -* Signals:: sigaction, kill, pause, alarm, etc. +* Signals:: sigaction, kill, pause, alarm, setitimer, etc. * Terminals and Ptys:: ttyname, tcsetpgrp, etc. * Pipes:: Communicating data between processes. * Networking:: gethostbyaddr, getnetent, socket, bind, listen. @@ -1456,6 +1456,30 @@ Sleep for I microseconds. @code{usleep} is not available on all platforms. @end deffn +@deffn primitive setitimer which_timer interval_seconds interval_microseconds value_seconds value_microseconds + +Set the timer specified by @var{which_timer} according to the given +@var{interval_seconds}, @var{interval_microseconds}, +@var{value_seconds}, and @var{value_microseconds} values, and return +information about the timer's previous setting. The timers available +are: @code{ITIMER_REAL}, @code{ITIMER_VIRTUAL}, and @code{ITIMER_PROF}, +and the return value will be a list of two cons pairs representing the +current state of the given timer. The first pair is the seconds and +microseconds of the timer @code{it_interval}, and the second pair is the +seconds and microseconds of the timer @code{it_value}. +@end deffn + +@deffn primitive getitimer which_timer +Return information about the timer specified by @var{which_timer}. The +timers available are: @code{ITIMER_REAL}, @code{ITIMER_VIRTUAL}, and +@code{ITIMER_PROF}, and the return value will be a list of two cons +pairs representing the current state of the given timer. The first pair +is the seconds and microseconds of the timer @code{it_interval}, and the +second pair is the seconds and microseconds of the timer +@code{it_value}. +@end deffn + + @node Terminals and Ptys @section Terminals and Ptys