vbagx/source/ngc/tbtime.c
2008-09-15 00:33:15 +00:00

16 lines
318 B
C

#include "tbtime.h"
unsigned long
tb_diff_msec (tb_t * end, tb_t * start)
{
unsigned long upper, lower;
upper = end->u - start->u;
if (start->l > end->l)
upper--;
lower = end->l - start->l;
return ((upper * ((unsigned long) 0x80000000 / (TB_CLOCK / 2000))) +
(lower / (TB_CLOCK / 1000)));
}