コード例 #1
0
ファイル: cookies.c プロジェクト: Acidburn0zzz/links-plus
int cookie_expired(struct cookie *c)	/* parse_http_date is broken */
{
	time_t t;
	errno = 0;
	EINTRLOOPX(t, time(NULL), (time_t)-1);
	return 0 && (c->expires && c->expires < t);
}
コード例 #2
0
ファイル: fn_impl.c プロジェクト: JamesLinus/LiteBSD-Ports
int gettimeofday(struct timeval *tv, struct timezone *tz)
{
	time_t t;
	errno = 0;
	EINTRLOOPX(t, time(NULL), (time_t)-1);
	if (tv) tv->tv_sec = t, tv->tv_usec = 0;
	if (tz) tz->tz_minuteswest = tz->tz_dsttime = 0;
	return 0;
}