Changeset 35802 in vbox for trunk/src/VBox/Runtime
- Timestamp:
- Feb 1, 2011 8:59:25 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/posix/thread-posix.cpp
r34628 r35802 39 39 #if defined(RT_OS_SOLARIS) 40 40 # include <sched.h> 41 # include <sys/resource.h> 41 42 #endif 42 43 … … 413 414 RTR3DECL(int) RTThreadGetExecutionTimeMilli(uint64_t *pKernelTime, uint64_t *pUserTime) 414 415 { 415 #ifndef RT_OS_DARWIN 416 #if defined(RT_OS_SOLARIS) 417 struct rusage ts; 418 int rc = getrusage(RUSAGE_LWP, &ts); 419 if (rc) 420 return RTErrConvertFromErrno(rc); 421 422 *pKernelTime = ts.ru_stime.tv_sec * 1000 + ts.ru_stime.tv_usec / 1000; 423 *pUserTime = ts.ru_utime.tv_sec * 1000 + ts.ru_utime.tv_usec / 1000; 424 return VINF_SUCCESS; 425 #elif !defined(RT_OS_DARWIN) 416 426 struct timespec ts; 417 427 int rc = clock_gettime(CLOCK_THREAD_CPUTIME_ID, &ts); … … 426 436 #endif 427 437 } 438
Note:
See TracChangeset
for help on using the changeset viewer.