Subversion Repositories Kolibri OS

Rev

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

Rev 5270 Rev 6082
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