Tsetitimer

Section: July 23, 1994 (2)
Updated: MiNT Programmer's Manual
Index Return to Main Contents
 

NAME

Tsetitimer - schedule an interval timer  

SYNOPSIS

LONG Tsetitimer( LONG which, LONG interval, LONG value, LONG ointerval, LONG ovalue );
 

DESCRIPTION

Tsetitimer is used to schedule a periodic timer. One of three timers, specified by which , may be selected. Timer 0 runs in real time, and sends a SIGALRM upon expiration. Timer 1 runs in process virtual time (that is, only when the process that scheduled the timer is running) and sends a SIGVTALRM upon expiration. Timer 2 runs both in process virtual time and when the operating system is running on behalf of the process that scheduled it, and sends a SIGPROF upon expiration.

value is the address of a longword specifying the initial timer value in milliseconds. If value == 0, then the current timer value remains unchanged. If the longword that value points to contains 0, the timer is cancelled.

Upon expiration of the initial timer value, the timer value is reset to the longword pointed to by interval . If interval == 0, the previously requested interval remains unchanged. If the longword that interval points to contains 0, the timer will be cancelled upon its first expiration.

ovalue and ointerval point to longwords into which will be written the current value and interval of the timer. If ovalue or ointerval == 0, the old values will not be passed back to the calling process.  

RETURNS

If an error occurs, a GEMDOS error code is returned.

Upon success, 0 is returned.  

SEE ALSO

Pause(2), Psignal(2), Talarm(2)  

BUGS

Internal calculations are done in milliseconds, so setting a timer more than 2 million seconds or so into the future will not work correctly.


 

Index

NAME
SYNOPSIS
DESCRIPTION
RETURNS
SEE ALSO
BUGS

This document was created by man2html, using the manual pages.
Time: 08:58:01 GMT, February 14, 2025