Index: /trunk/include/iprt/thread.h
===================================================================
--- /trunk/include/iprt/thread.h	(revision 32904)
+++ /trunk/include/iprt/thread.h	(revision 32905)
@@ -651,4 +651,14 @@
 
 
+/**
+ * Get the execution times of the specified thread
+ *
+ * @returns IPRT status code.
+ * @param   hThread             The thread handle.
+ * @param   pKernelTime         Kernel execution time in ms (out)
+ * @param   pUserTime           User execution time in ms (out)
+ *
+ */
+RTR3DECL(int) RTThreadGetExecutionTimeMilli(RTTHREAD hThread, uint64_t *pKernelTime, uint64_t *pUserTime);
 
 /** @name Thread Local Storage
Index: /trunk/src/VBox/Runtime/r3/os2/thread-os2.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r3/os2/thread-os2.cpp	(revision 32904)
+++ /trunk/src/VBox/Runtime/r3/os2/thread-os2.cpp	(revision 32905)
@@ -293,2 +293,7 @@
 }
 
+
+RTR3DECL(int) RTThreadGetExecutionTimeMilli(RTTHREAD hThread, uint64_t *pKernelTime, uint64_t *pUserTime)
+{
+    return VERR_NOT_IMPLEMENTED;
+}
Index: /trunk/src/VBox/Runtime/r3/posix/thread-posix.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r3/posix/thread-posix.cpp	(revision 32904)
+++ /trunk/src/VBox/Runtime/r3/posix/thread-posix.cpp	(revision 32905)
@@ -387,2 +387,6 @@
 #endif
 
+RTR3DECL(int) RTThreadGetExecutionTimeMilli(RTTHREAD hThread, uint64_t *pKernelTime, uint64_t *pUserTime)
+{
+    return VERR_NOT_IMPLEMENTED;
+}
Index: /trunk/src/VBox/Runtime/r3/win/thread-win.cpp
===================================================================
--- /trunk/src/VBox/Runtime/r3/win/thread-win.cpp	(revision 32904)
+++ /trunk/src/VBox/Runtime/r3/win/thread-win.cpp	(revision 32905)
@@ -223,2 +223,18 @@
 }
 
+
+RTR3DECL(int) RTThreadGetExecutionTimeMilli(RTTHREAD hThread, uint64_t *pKernelTime, uint64_t *pUserTime)
+{
+    uint64_t u64CreationTime, u64ExitTime, u64KernelTime, u64UserTime;
+
+    if (GetThreadTimes(hThread, (LPFILETIME)&u64CreationTime, (LPFILETIME)&u64ExitTime, (LPFILETIME)&u64KernelTime, (LPFILETIME)&u64UserTime))
+    {
+        *pKernelTime = u64KernelTime / 10000;    /* GetThreadTimes returns time in 100 ns units */
+        *pUserTime   = u64UserTime / 10000;    /* GetThreadTimes returns time in 100 ns units */
+        return VINF_SUCCESS;
+    }
+
+    int iLastError = GetLastError();
+    AssertMsgFailed(("GetThreadTimes failed, LastError=%d\n", iLastError));
+    return RTErrConvertFromWin32(iLastError);
+}
