vbox的更動 35876 路徑 trunk/src/VBox/Runtime/r3/posix
- 時間撮記:
- 2011-2-7 下午02:54:18 (14 年 以前)
- 檔案:
-
- 修改 1 筆資料
圖例:
- 未更動
- 新增
- 刪除
-
trunk/src/VBox/Runtime/r3/posix/thread-posix.cpp
r35850 r35876 419 419 #endif 420 420 421 /** @todo move this into platform specific files. */ 421 422 RTR3DECL(int) RTThreadGetExecutionTimeMilli(uint64_t *pKernelTime, uint64_t *pUserTime) 422 423 { … … 430 431 *pUserTime = ts.ru_utime.tv_sec * 1000 + ts.ru_utime.tv_usec / 1000; 431 432 return VINF_SUCCESS; 433 432 434 #elif defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD) 433 435 /* on Linux, getrusage(RUSAGE_THREAD, ...) is available since 2.6.26 */ … … 440 442 *pUserTime = (uint64_t)ts.tv_sec * 1000 + ts.tv_nsec / 1000000; 441 443 return VINF_SUCCESS; 444 442 445 #elif defined(RT_OS_DARWIN) 443 446 thread_basic_info ThreadInfo; … … 446 449 447 450 krc = thread_info(mach_thread_self(), THREAD_BASIC_INFO, (thread_info_t)&ThreadInfo, &Count); 448 Assert (krc == KERN_SUCCESS);451 AssertReturn(krc == KERN_SUCCESS, RTErrConvertFromDarwinKern(krc)); 449 452 450 453 *pKernelTime = ThreadInfo.system_time.seconds * 1000 + ThreadInfo.system_time.microseconds / 1000; 451 *pUserTime = ThreadInfo.user_time.seconds * 1000 + ThreadInfo.user_time.microseconds / 1000;;454 *pUserTime = ThreadInfo.user_time.seconds * 1000 + ThreadInfo.user_time.microseconds / 1000; 452 455 453 456 return VINF_SUCCESS;
注意:
瀏覽 TracChangeset
來幫助您使用更動檢視器