Topic : TOS - das Betriebssystem Author : Version : tos.hyp (5. März 2013) Subject : Programmieren/Atari Nodes : 3001 Index Size : 93602 HCP-Version : 5 Compiled on : Atari @charset : atarist @lang : @default : Titel @help : @options : +g -i -s +x +zz -t4 @width : 70 View Ref-File5.14.11 Suptime TOS Name: »Suptime« - returns the current uptime and load averages from the system. Gemdosnummer: 319 (0x013f) Deklaration: int32_t Suptime ( int32_t *uptime, int32_t *loadaverage ); Beschreibung: This function returns the current uptime and load averages from the system. uptime is a pointer to a LONG value that will be filled with the current amount of seconds elapsed since last reboot. loadaverage is a pointer to a three longword array, that will be filled with the current load averages (for last 1, 5 and 15 minutes). The load average value is calculated using the following formula: sum += (new_load - old_load) * LOAD_SCALE; load_avg = sum / MAX_SIZE; where LOAD_SCALE is 2048, MAX_SIZE is the number of 5 second periods in the specified amount of time (12 for 1 min., 60 for 5 min. and 180 for 15 min). new_load is the number of currently running processes, old_load is the number of processes running previous time. A 'running' process is considered the one which is put onto run or ready queue. Ergebnis: Returns E_OK or a negative GEMDOS error code otherwise (actually it may be only ENOSYS if the call is not supported...). Verfügbar: Available when a 'MiNT' cookie with a version of at least 1.11 exists. Gruppe: Systemfunktionen Querverweis: Binding