Changeset 35876 in vbox for trunk/src/VBox/Runtime/r3/posix
- Timestamp:
- Feb 7, 2011 2:54:18 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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;
Note:
See TracChangeset
for help on using the changeset viewer.