Classes | |
struct | GF_SystemRTInfo |
run-time system info object More... | |
Enumerations | |
enum | { GF_RTI_ALL_PROCESSES_TIMES = 1, GF_RTI_PROCESS_MEMORY = 1<<1, GF_RTI_SYSTEM_MEMORY_ONLY = 1<<2 } |
Functions | |
void | gf_sys_init () |
System setup. | |
void | gf_sys_close () |
System closing. | |
u32 | gf_sys_clock () |
System clock query. | |
void | gf_sleep (u32 ms) |
Sleeps thread/process. | |
Bool | gf_sys_get_rti (u32 refresh_time_ms, GF_SystemRTInfo *rti, u32 flags) |
Gets Run-Time info. | |
Bool | gf_sys_get_battery_state (Bool *onBattery, u32 *state, u32 *level) |
anonymous enum |
Selection flags for run-time info retrieval
void gf_sys_init | ( | ) |
Inits the system high-resolution clock if any, and CPU usage manager. It is strongly recommended to call this function before calling any other GPAC functions, since on some systems (like winCE) it may result in a better memory usage estimation.
void gf_sys_close | ( | ) |
Closes the system high-resolution clock and any CPU associated ressources.
u32 gf_sys_clock | ( | ) |
Gets the system clock time.
void gf_sleep | ( | u32 | ms | ) |
Locks calling thread/process execution for a given time.
ms | Amount of time to sleep in milliseconds. |
Bool gf_sys_get_rti | ( | u32 | refresh_time_ms, | |
GF_SystemRTInfo * | rti, | |||
u32 | flags | |||
) |
Gets CPU and memory usage info for the calling process and the system. Information gathering is controled through timeout values.
refresh_time_ms | refresh time period in milliseconds. If the last sampling was done less than this period ago, the function aborts. | |
rti | holder to the run-time info structure to update. | |
flags | specify which info is to be retrieved. |