libowfat/taia/taia_half.c

12 lines
287 B
C
Raw Normal View History

2005-10-14 15:37:19 +00:00
#include "taia.h"
/* XXX: breaks tai encapsulation */
void taia_half(tai6464* t,const tai6464* u) {
t->atto = u->atto >> 1;
2014-03-14 19:42:54 +00:00
if (u->nano & 1) t->atto += (uint32)500000000UL;
2005-10-14 15:37:19 +00:00
t->nano = u->nano >> 1;
2014-03-14 19:42:54 +00:00
if (u->sec.x & 1) t->nano += (uint32)500000000UL;
2005-10-14 15:37:19 +00:00
t->sec.x = u->sec.x >> 1;
}