Thread: Creating a timer

  1. #1
    Registered User
    Join Date
    Dec 2006
    Posts
    69

    Creating a timer

    What is the general, platform indepent way to get the current time in milliseconds?

    I need it for something like this:
    Code:
    StartTime = getCurrentTime();
    while(getCurrentTime() - StartTime < Timeout)
    {
       doSomething();
    }

  2. #2
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    There is none. Sorry.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Profiler Valgrind
    By afflictedd2 in forum C++ Programming
    Replies: 4
    Last Post: 07-18-2008, 09:38 AM
  2. SIGALRM and timer
    By nkhambal in forum C Programming
    Replies: 1
    Last Post: 06-30-2008, 12:23 AM
  3. tic tac toe crashes :(
    By stien in forum Game Programming
    Replies: 4
    Last Post: 05-13-2007, 06:25 PM
  4. Creating a timer in C++
    By motocross95 in forum C++ Programming
    Replies: 6
    Last Post: 11-29-2002, 06:22 PM