blob: 12bc98e6da7b716439ace650ba03c4cb67e46f3d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
/* ISC license. */
#include <skalibs/tai.h>
int tain_sub (tain *t, tain const *u, tain const *v)
{
tain tt ;
tt.sec.x = u->sec.x - v->sec.x ;
tt.nano = u->nano - v->nano ;
if (tt.nano > u->nano)
{
tt.sec.x-- ;
tt.nano += 1000000000U ;
}
*t = tt ;
return 1 ;
}
|