コード例 #1
0
ファイル: timeval.c プロジェクト: 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;
}
コード例 #2
0
ファイル: timeval.c プロジェクト: macauleycheng/aos-dpctl
/* Returns the current time, in seconds. */
time_t
time_now(void)
{
    refresh_if_ticked();
    return now.tv_sec;
}