C++ Time

i want to get current time but it returns seconds from 1/1/1970. Is there any additional function or method
http://cplusplus.com/reference/clibrary/ctime/

that's the default functionality C++ provides to measure time. I can't help you if you don't get more specific than that.
If your problem is how to convert it in a string showing current date and time you can do in this way:

time_t rawTime = time ( NULL );

// you have current time in seconds from 1/1/1970

struct tm *locTime = localtime ( &rawTime );

// get a struct with local time

string currentTimeStr = = asctime ( locTime );

// get a string representation of current time
Topic archived. No new replies allowed.