Home Segments Index Top Previous Next

584: Mainline

The localtime function also has a pointer parameter of type time_t, but the purpose of localtime is to analyze your time_t variable's value, rather than to assign a value to your time_t variable. In the following, for example, localtime is to analyze the number of elapsed seconds previously fetched from your operating system by the time function:

localtime (&elapsed_seconds);