Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QTimer timeout delay debug mode in MSVC2010
Forum Updated to NodeBB v4.3 + New Features

QTimer timeout delay debug mode in MSVC2010

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 1.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • T Offline
    T Offline
    tcampos
    wrote on last edited by
    #1

    Hello,

    I'm trying an implementation that uses a timer having a 20ms timeout. The SLOT called by the timeout SIGNAL does a considerable amount of work and relies on the accumulated time from the timeouts to return the desirable output in a QGraphicsScene/View.

    When executing the app in release mode everything runs fine and smooth.
    In debug mode, using Visual Studio 2010 Ultimate, I found the timer to have slight delays that blow the usability of the application. The delay increases with the amount of work done by the GUI thread.

    Is this a MSVC2010 issue or do you recommend another type of implementation? Maybe relying on the system time instead of the 20ms value?

    Thanks in advance...

    1 Reply Last reply
    0
    • K Offline
      K Offline
      koahnig
      wrote on last edited by
      #2

      [quote author="tcampos" date="1340035695"]
      Is this a MSVC2010 issue or do you recommend another type of implementation? Maybe relying on the system time instead of the 20ms value?
      [/quote]
      This might depend on your implementation. I guess you simply define a QTimer with a 20 ms interval. It should be fired more or less every 20 ms. There are other thread concentrating on the variations caused by the scheduling of the OS. This should be system time. What should it be?

      The debug mode compilations are typically requiring more time for processing. If you run your application compiled in debug in the debugger it even more time. If the CPU consumption for slot routine is already close to 20 ms, it is very likely that it take more than 20 ms in the debugger.

      Vote the answer(s) that helped you to solve your issue(s)

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved