¡@

Home 

2014/10/15 ¤U¤È 10:04:33

iphone Programming Glossary: basic_info_th

iOS - Get CPU usage from application

http://stackoverflow.com/questions/8223348/ios-get-cpu-usage-from-application

thread_count thread_info_data_t thinfo mach_msg_type_number_t thread_info_count thread_basic_info_t basic_info_th uint32_t stat_thread 0 Mach threads basic_info task_basic_info_t tinfo get threads in the task kr task_threads mach_task_self.. kr thread_info thread_list j THREAD_BASIC_INFO thread_info_t thinfo thread_info_count if kr KERN_SUCCESS return 1 basic_info_th thread_basic_info_t thinfo if basic_info_th flags TH_FLAGS_IDLE tot_sec tot_sec basic_info_th user_time.seconds basic_info_th.. thread_info_t thinfo thread_info_count if kr KERN_SUCCESS return 1 basic_info_th thread_basic_info_t thinfo if basic_info_th flags TH_FLAGS_IDLE tot_sec tot_sec basic_info_th user_time.seconds basic_info_th system_time.seconds tot_usec tot_usec..