Time, date and FPS functions.
Code:
float fLastTickCount = 0.0f;
float fCurrentTickCount;
char cFrameRate[30];
fCurrentTickCount = clock() * 0.001f;
noFps++;
if((fCurrentTickCount - fLastTickCount) > 1.0f)
{
fLastTickCount = fCurrentTickCount;
sprintf(FPSxD, "%d", noFps);
noFps = 0;
}
Code:
char date[20];
struct tm * current_tm;
time_t current_time;
time (¤t_time);
current_tm = localtime (¤t_time);
sprintf( DatexD, "%d-%02d-%d",current_tm->tm_mon+1,current_tm->tm_mday,current_tm->tm_year-100+2000);
Code:
#include <time.h>
char date[20];
struct tm * current_tm;
time_t current_time;
time (¤t_time);
current_tm = localtime (¤t_time);
sprintf( TimexD,"%02d:%02d:%02d", current_tm->tm_hour, current_tm->tm_min, current_tm->tm_sec );
Simple ways of doing it /

My Time Function is a bit smaller. And i think you dont have to include the time.h.
Bcuz i didnt included it and it works.
Nice Job Bro. But there is a slightly better way of doing it!
xD I do time and date differently.
[php]#include <ctime>
time_t t = time(0);
cpp.PrintText(ScreenCenterX-1, 10, D3DCOLOR_XRGB(0,0,0), cpp.pFont1, ctime(&t));[/php]
Very simple...