Results 1 to 2 of 2

Thread: Timing for games. Is there anything like SDL_GetTicks

  1. #1
    Join Date
    Apr 2009
    Posts
    132
    Thanks
    67
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Red face Timing for games. Is there anything like SDL_GetTicks

    Hi friends

    My level editor has the possibility to its play levels. Now I'm working on timing. a QTimer is not enough because my objects' state charts must know what is the current time with a milisecond precission.

    I use a QTimer object to launch an update method every 20 ms (that is, 50 frames per second), but I don't find any method/object on QT libs like SDL_GetTicks (milisecons since app was launched, I use this to program my objects' state charts)

    Do you have any idea or suggestion?

    Thanks in advance

  2. #2
    Join Date
    Jul 2009
    Posts
    139
    Thanks
    13
    Thanked 59 Times in 52 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Timing for games. Is there anything like SDL_GetTicks

    See QTime, notably the start and elapsed functions.

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.