none
GetTickCount() performance RRS feed

  • Question

  • Hello,

    I have the following doubt. I need to measure tick count inside a touch driver. Using GetTickCount() function is better ? The driver will have poor performance using this function ?

    Thanks,

    Paolo.

    Thursday, July 21, 2011 6:29 AM

Answers

  • "Using GetTickCount() function is better" than ...?

    I do not see performance issues in using GetTickCount.

    By the way, if you search for GetTickCount in %_WINCEROOT%\PUBLIC\COMMON\OAK\DRIVERS you get  > 200 hits so its usage in drivers is very common. Also the touch ISR (%_WINCEROOT%PUBLIC\COMMON\OAK\DRIVERS\TOUCH\TCHMAIN\tchmain.c):

              if ( (GetTickCount() - BaseTime) > CAL_HOLD_STEADY_TIME )
                {
                fGotSample = TRUE;
                }

     


    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom www.eurotech.com Check my blog: http://lcalligaris.wordpress.com
    Thursday, July 21, 2011 8:21 AM

All replies

  • "Using GetTickCount() function is better" than ...?

    I do not see performance issues in using GetTickCount.

    By the way, if you search for GetTickCount in %_WINCEROOT%\PUBLIC\COMMON\OAK\DRIVERS you get  > 200 hits so its usage in drivers is very common. Also the touch ISR (%_WINCEROOT%PUBLIC\COMMON\OAK\DRIVERS\TOUCH\TCHMAIN\tchmain.c):

              if ( (GetTickCount() - BaseTime) > CAL_HOLD_STEADY_TIME )
                {
                fGotSample = TRUE;
                }

     


    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom www.eurotech.com Check my blog: http://lcalligaris.wordpress.com
    Thursday, July 21, 2011 8:21 AM
  • Ok thank you very much ! Paolo.
    Thursday, July 21, 2011 8:28 AM
  • Hello Paolo,

     It depends on time resolution that you want to get. There is no problem for milliseconds with GetTickCount, but it needs to use High Performance counter (QueryPerformanceCounter() ) to obtain microsecond resolution.

     

    Thursday, July 21, 2011 8:35 AM