btest.c
void timespec_add(struct timespec *t1, struct timespec *t2)
{
	t1->tv_sec += t2->tv_sec;
	t1->tv_nsec += t2->tv_nsec;
	if (t1->tv_nsec >= 1000000000) {
		t1->tv_sec += t1->tv_nsec/1000000000;
		t1->tv_nsec %= 1000000000;
	}
}
/* Add timespec t2 onto timespec t1 onto an existing one  */
Add timespec t2 onto timespec t1 onto an existing one
Add timespec t2 onto timespec t1 onto an existing one
void timespec_add(struct timespec *t1, struct timespec *t2)
{
	t1->tv_sec += t2->tv_sec;
	t1->tv_nsec += t2->tv_nsec;
	if (t1->tv_nsec >= 1000000000) {
		t1->tv_sec += t1->tv_nsec/1000000000;
		t1->tv_nsec %= 1000000000;
	}
}
void timespec_add ( struct timespec * t1 , struct timespec * t2 ) { t1 -> tv_sec += t2 -> tv_sec ; t1 -> tv_nsec += t2 -> tv_nsec ; if ( t1 -> tv_nsec >= 1000000000 ) { t1 -> tv_sec += t1 -> tv_nsec / 1000000000 ; t1 -> tv_nsec %= 1000000000 ; } }
Add timespec t2 onto timespec t1 onto an existing one
Add timespec t2 onto timespec t1 onto an existing one