Subversion Repositories Kolibri OS

Rev

Rev 5270 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 5270 Rev 6082
Line 38... Line 38...
38
		return 1;
38
		return 1;
39
	return lhs->tv_usec - rhs->tv_usec;
39
	return lhs->tv_usec - rhs->tv_usec;
40
}
40
}
Line 41... Line 41...
41
 
41
 
42
extern time64_t mktime64(const unsigned int year, const unsigned int mon,
42
extern time64_t mktime64(const unsigned int year, const unsigned int mon,
43
			    const unsigned int day, const unsigned int hour,
43
			const unsigned int day, const unsigned int hour,
Line 44... Line 44...
44
			    const unsigned int min, const unsigned int sec);
44
			const unsigned int min, const unsigned int sec);
45
 
45
 
46
/**
46
/**
47
 * Deprecated. Use mktime64().
47
 * Deprecated. Use mktime64().
Line 108... Line 108...
108
	if ((unsigned long long)ts->tv_sec >= KTIME_SEC_MAX)
108
	if ((unsigned long long)ts->tv_sec >= KTIME_SEC_MAX)
109
		return false;
109
		return false;
110
	return true;
110
	return true;
111
}
111
}
Line -... Line 112...
-
 
112
 
-
 
113
static inline bool timeval_valid(const struct timeval *tv)
-
 
114
{
-
 
115
	/* Dates before 1970 are bogus */
-
 
116
	if (tv->tv_sec < 0)
-
 
117
		return false;
-
 
118
 
-
 
119
	/* Can't have more microseconds then a second */
-
 
120
	if (tv->tv_usec < 0 || tv->tv_usec >= USEC_PER_SEC)
-
 
121
		return false;
-
 
122
 
-
 
123
	return true;
-
 
124
}
112
 
125
 
Line 113... Line 126...
113
extern struct timespec timespec_trunc(struct timespec t, unsigned gran);
126
extern struct timespec timespec_trunc(struct timespec t, unsigned gran);
114
 
127