Time functions on C and C++

I want to know the functions that use to handle time. Its parameters and return type...


  • C/C++ usually uses the time() and localtime() functions
    to manipulate time. Calling time() returns a pointer to time_t (if I remeber correctly) which you can then pass to localtime(). This function then converts the raw time value into a "struct tm". This contians fields with the hour, minute and second values at the time when time() was called.

    For more information, look at the time.h header.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


In this Discussion