Thread: Unknown library

  1. #1
    ---
    Join Date
    May 2004
    Posts
    1,379

    Unknown library

    I have started to work through some DX9 tutorials and i have come across the use of this function from time to time
    timeGetTime()

    I can't compile it. I tried searching google and it is from the Windows Multimedia SDK (?) and I couldn't find anywhere to download it! I thought that something like that would come with the DX9 SDK. Where do I get it from?

    [edit]
    In the mean time I've been able to replace it with GetTickCount()
    I'm not sure what the difference is between the two functions though.
    Last edited by sand_man; 05-27-2005 at 08:19 PM.

  2. #2
    Slave MadCow257's Avatar
    Join Date
    Jan 2005
    Posts
    735
    According to the msdn, it's not a DX function. Including Windows.h should allow you to use timeGetTime().
    Last edited by MadCow257; 05-27-2005 at 08:22 PM. Reason: case sensitivity

  3. #3

    Join Date
    May 2005
    Posts
    1,042
    link winmm.lib

  4. #4
    ---
    Join Date
    May 2004
    Posts
    1,379
    That did it, thanks bogmcgee

  5. #5
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    GetTickCount() is more accurate.

  6. #6
    Registered User
    Join Date
    Aug 2003
    Posts
    1,218
    or why not use QueryPerformanceCounter?? That is a very accurate way of doing timing.
    STL Util a small headers-only library with various utility functions. Mainly for fun but feedback is welcome.

  7. #7
    Registered User
    Join Date
    Aug 2003
    Posts
    288
    i always thought it was (in order of accuracy, descending):

    QueryPerformanceCounter()...
    timeGetTime()
    GetTickCount()

  8. #8
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    QueryPerformanceCounter()
    GetTickCount()
    timeGetTime()

    is my understanding.

  9. #9
    Registered User
    Join Date
    Apr 2002
    Posts
    1,571
    If you use timeGetTime then you want to use the timeBeginPeriod and timeEndPeriod functions to control the resolution. Pass 1 to timeBeginPeriod to set the resolution to 1ms which is MUCH better than the default resolution I assure you. Read the docs for return values from this function. Then when you are done make sure you call timeEndPeriod to reset the timer to be updated at its' default interval.
    "...the results are undefined, and we all know what "undefined" means: it means it works during development, it works during testing, and it blows up in your most important customers' faces." --Scott Meyers

  10. #10
    ---
    Join Date
    May 2004
    Posts
    1,379
    lol thanks

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Property Set Library (PSL) - Announcement
    By vultur_gryphus in forum Projects and Job Recruitment
    Replies: 0
    Last Post: 05-29-2008, 06:04 AM
  2. Makefile for a library
    By sirmoreno in forum Linux Programming
    Replies: 5
    Last Post: 06-04-2006, 04:52 AM
  3. very weird .h problem
    By royuco77 in forum C++ Programming
    Replies: 1
    Last Post: 09-11-2005, 07:55 AM
  4. Please Help - Problem with Compilers
    By toonlover in forum C++ Programming
    Replies: 5
    Last Post: 07-23-2005, 10:03 AM
  5. UNICODE and GET_STATE
    By Registered in forum C++ Programming
    Replies: 1
    Last Post: 07-15-2002, 03:23 PM