Search:

Type: Posts; User: c99tutorial

Search: Search took 0.03 seconds.

  1. Replies
    7
    Views
    1,098

    The line time_t t0 = time(NULL); will get...

    The line

    time_t t0 = time(NULL);

    will get the current time as a number of seconds. If you later call time(NULL) and assign it to t1, then the amount of time elapsed is t1-t0.
  2. Replies
    7
    Views
    1,098

    struct tm is how the various parts of the time...

    struct tm is how the various parts of the time are defined. Look at the documentation I linked to; its all explained there in detail.

    -> means to access a field in the case that the container is a...
  3. Replies
    7
    Views
    1,098

    The type time_t is simply an integer value...

    The type time_t is simply an integer value representing a number of seconds. Therefore, if your program is expected to take one hour, you need only to add 3600 to the time_t variable which represents...
  4. Replies
    7
    Views
    1,098

    This functionality is supplied in the time.h...

    This functionality is supplied in the time.h header file. A good documentation page for it is here:

    <time.h>

    For an example, to get the current hours, minutes and seconds you could do it like...
Results 1 to 4 of 4