Exemplo n.º 1
0
Arquivo: timeval.c Projeto: ecks/harry
/* Returns the current time, in ms (within TIME_UPDATE_INTERVAL ms). */
long long int
time_msec(void)
{
    refresh_if_ticked();
    return (long long int) now.tv_sec * 1000 + now.tv_usec / 1000;
}
Exemplo n.º 2
0
/* Returns the current time, in seconds. */
time_t
time_now(void)
{
    refresh_if_ticked();
    return now.tv_sec;
}