timing in c++
Hi all,
Was just wondering the best method to keep track of time elapsed or just real time for that matter. I know that in glX code, you get use the function getMilliSeconds() to return time elapsed in milli seconds while in SDL you can use SDL_GetTicks() to do the same thing. However, is there a way of doing it in console mode? I've tried reading some stuff on time/date in c++ but can't seem to figure it out (ie localtime/gmtime require a time argument). Any help/suggestions? Thanks |
If I get what you want: gettimeofday() returns a very fine grained time.
It's in time.h |
Time.h
Code:
#include <stdio.h> Enjoy! |
All times are GMT -5. The time now is 04:15 PM. |