Subj : Re: high resolution time function under visual c++ environment? To : comp.programming From : Rob Thorpe Date : Tue Aug 02 2005 02:26 am wavelet wrote: > Hi, > > I am searching one time function under windows2000 > with Visual C++ environment. Is there function available > like gethrtime() in unix? Thx. > > > #include > > main() > { > hrtime_t start, end; > int i, iters = 100; > > start = gethrtime(); > for (i = 0; i < iters; i++) > getpid(); > end = gethrtime(); > printf("Avg getpid() time = %lld nsec\n", (end - start) / iters); > } These questions are better asked in comp.os.ms-windows.programmer.win32 There is an ill-documented function called "QueryPerformanceCounter" that may do what you want. .