<ctime>

Inclui o cabeçalho <time.h> da biblioteca C Standard e adiciona os nomes associados ao namespace std.

Sintaxe

#include <ctime>

Comentários

A inclusão desse cabeçalho garante que os nomes declarados usando vinculação externa no cabeçalho da biblioteca C Padrão sejam declarados no namespace std.

Constantes

#define NULL
#define CLOCKS_PER_SEC
#define TIME_UTC

namespace std {
    using size_t = see below;
    using clock_t = see below ;
    using time_t = see below ;
}

Estruturas

struct timespec;
struct tm;

Funções

clock_t clock();
double difftime(time_t time1, time_t time0);
time_t mktime(struct tm* timeptr);
time_t time(time_t* timer);
int timespec_get(timespec* ts, int base);
char* asctime(const struct tm* timeptr);
char* ctime(const time_t* timer);
struct tm* gmtime(const time_t* timer);
struct tm* localtime(const time_t* timer);
size_t strftime(char* s, size_t maxsize, const char* format, const struct tm* timeptr);

Confira também

Referência de Arquivos de Cabeçalho
Visão geral da biblioteca padrão C++
Acesso Thread-Safe na Biblioteca Padrão C++