how can i get the tim covered in between 2 or more statements?

This is a discussion on how can i get the tim covered in between 2 or more statements? within the C++ Programming forums, part of the General Programming Boards category; how can i get the tim covered in between 2 or more statements?...

  1. #1
    Registered User devil@work's Avatar
    Join Date
    Mar 2003
    Posts
    33

    how can i get the tim covered in between 2 or more statements?

    how can i get the tim covered in between 2 or more statements?

  2. #2
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    In windows API you can use GetTickCount() to recieve the amount of milliseconds since windows started. In a DOS environment you could probably use gettime(), but then you get it in the form h:m:s:hs.
    Code:
    Time1 = GetTickCount();
    DoSomething();
    Time2 = GetTickCount();
    TimeDif = Time2 - Time1;
    (All times are DWORD:s)
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  3. #3
    Registered User devil@work's Avatar
    Join Date
    Mar 2003
    Posts
    33
    in linux?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Unknown memory leak with linked lists...
    By RaDeuX in forum C Programming
    Replies: 6
    Last Post: 12-07-2008, 04:09 AM
  2. newbie question - if statements without conditions
    By c_h in forum C++ Programming
    Replies: 2
    Last Post: 07-18-2008, 11:42 AM
  3. Effecient Selection Statements?
    By 031003b in forum C++ Programming
    Replies: 1
    Last Post: 10-25-2007, 07:08 AM
  4. Efficiency of case statements
    By Yasir_Malik in forum C Programming
    Replies: 26
    Last Post: 05-23-2006, 12:36 PM
  5. Statements and Functions
    By GeekFreak in forum C++ Programming
    Replies: 5
    Last Post: 08-15-2002, 01:34 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21