Книга: Programming with POSIX® Threads

6.5.4 Time representation

6.5.4 Time representation

char *asctime_r (const struct tm *tm, char *buf);

char *ctime_r (const time_t *clock, char *buf);

struct tm *gmtime_r (const time_t *clock, struct tm *result);

struct tm *localtime_r (const time_t *clock, struct tm *result);

The output buffers (buf and result) are supplied by the caller, instead of returning a pointer to static storage internal to the functions. Otherwise, they are identical to the traditional variants. The asctime_r and ctime_r routines, which return ASCII character representations of a system time, both require that their buf argument point to a character string of at least 26 bytes.

Оглавление книги


Генерация: 1.619. Запросов К БД/Cache: 3 / 0
поделиться
Вверх Вниз