Results 1 to 4 of 4

Thread: QTimer resolution.

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Sep 2009
    Posts
    15
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default QTimer resolution.

    Hi, i am using QTimer in my application to set the frecuency of my main loop, and trying to set the FPS of my app.
    First, ill post the values i put in setInterval(), and the values i get between elapsed():

    setInterval() - elapsed()
    1 ------------- 1
    2 ------------- 2
    3 ------------- 3
    ... ----------- ...
    19 ----------- 19
    20 ----------- 20

    21..31 --------- 31

    32..46 --------- 46

    47..62 --------- 62

    etc...

    I know windows have a resolution of 15.625 ms, and the results from 20 miliseconds work as expected, but under 20ms, its gives a nice 1ms resolution, so i guess QTimer uses another implementation (Multimedia timers??) when you set the interval under 20ms. I have also noticed that CPU is higher under 20 ms and drops to nearly 0 after 21 ms, so this would confirm that the more demanding multimedia timers are used.

    I hope we can clarify this, as QTimer documentation is very short for this...

  2. The following user says thank you to Netich for this useful post:

    dashesy (31st March 2010)

Similar Threads

  1. Change The VGA Resolution On The Fly
    By guninia in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 11th November 2009, 06:22
  2. Screen resolution
    By sabeesh in forum Qt Programming
    Replies: 4
    Last Post: 7th September 2007, 17:00
  3. how to scale according to the used resolution
    By rmagro in forum Qt Programming
    Replies: 1
    Last Post: 3rd July 2007, 10:43
  4. Trouble with resolution
    By Xaar in forum Newbie
    Replies: 6
    Last Post: 23rd February 2007, 18:58

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.