•  Back 
  •  Date and Time 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  Help page 
  •  Show info about hypertext 
  •  View a new file 
Topic       : TOS - The Operating System
Author      : 
Version     : tos.hyp (December 19, 2008)
Subject     : Programmieren/Atari
Nodes       : 3010
Index Size  : 93790
HCP-Version : 5
Compiled on : Atari
@charset    : atarist
@lang       : 
@default    : Title
@help       : 
@options    : +g -i -s +x +zz -t4
@width      : 70
View Ref-File5.11.7  Tsetitimer                                                 TOS

 Name:         »Tsetitimer« - Control a periodic timer.

 Opcode:       329 (0x0149)

 Syntax:       int32_t Tsetitimer ( int16_t which, int32_t interval, 
               int32_t value, int32_t ointerval, int32_t ovalue );

 Description:  The GEMDOS routine Tsetitimer controls one of three 
               possible periodic timers. The following apply:

                Parameter  Meaning

                which      Desired timer
                            0 =  This timer works in real time, and 
                                 sends the signal SIGALRM on expiry
                            1 =  This timer works in 'virtual process 
                                 time' and sends the signal SIGVTALRM 
                                 on expiry. The timer in this case 
                                 runs only when the process that is 
                                 controlling the timer currently owns 
                                 the CPU.
                            2 =  This timer works both in 'virtual 
                                 process time' as well as when the 
                                 operating system itself is active. On 
                                 expiry of the timer the signal 
                                 SIGPROF is sent.
                interval   Address of an int32_t which holds the value 
                           to which the timer is to be set on expiry. 
                           A NULL-pointer means that the corresponding 
                           old value should not be changed. If the 
                           int32_t holds the value 0, the timer will 
                           be deactivated after its expiry.
                value      Address of an int32_t which holds the 
                           initial value of the timer in milliseconds. 
                           A NULL-pointer leaves the current timer 
                           unaffected. If the int32_t holds the value 
                           0, the timer will be deactivated.
                ointerval  Address of an int32_t which holds the 
                           current intervall of the timer, or NULL if 
                           this value is of no interest.
                ovalue     Address of an int32_t which holds the 
                           current value of the timer, or NULL if this 
                           value is of no interest.

               As all internal calculations are measured in 
               miliseconds, it is not possible to set a timer to (very 
               large, future) arbitrary values.

               Setting new interval values needs root privileges.

 Return value: The function returns 0 when executed correctly, or a a 
               negative value in case of error.

 Availability: This function is optional, so a call may be answered 
               with EINVFN. Available when a 'MiNT' cookie with a 
               version of at least 1.11 exists.

 Group:        Date and Time

 See Also:     Binding   Pause   Psignal   Talarm