Community
cancel
Showing results for 
Search instead for 
Did you mean: 
nono_38
Beginner
31 Views

how to get thread time

hello

i want to get the time spent by any thread on win32

when i uste GeTthreadTimes(user,kernel) the minimum resolution is 1ms
how to get the delta of 1ms
if i call many time GeThreadTimes() in the delta de 1ms the function return allways the same time !!!!!!
the QueryPerformanceCounter() use high resolution timming but is not correct for thread time
i want thread time user & kernel in high resolution timming : 100ns
anyone know or have solution ?????

thanks


0 Kudos
2 Replies
robert-reed
Valued Contributor II
31 Views

You can get more accurate timing using the Time Stamp Counter (TSC) but need to be aware of certain caveats: CPU clock throttling on some mobile processors can make RDTSC unusable, and this counter can also suffer from skew between a set of affiliated cores. If the thread bounces from one core to another between a pair of RDTSCs, you may actually see anegative delta. The precision of the TSC is a CPU clock cycle, but its accuracy may be no better than the bus clock cycle.
jalal_khalil
Beginner
31 Views

Hi,

I am going to write a paper about "Dual Core". The paper should discuss the issues of parallism in theses processors.

I dont have enough ideasand resoures about parallel issues in dual core. i mean some codes , threading, or any other materials that can help.

I hope you can help me, and really i will be thankfull

Regards,

Jalal