Add time value operations to clear to zero and test for zero.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
master
Richard Cochran 2012-03-11 10:46:45 +01:00
parent 5f0c034494
commit e38488ae48
1 changed files with 10 additions and 0 deletions

10
tmv.h
View File

@ -51,11 +51,21 @@ static inline tmv_t tmv_div(tmv_t a, int divisor)
return a / divisor;
}
static inline int tmv_is_zero(tmv_t x)
{
return x == ((tmv_t) 0) ? 1 : 0;
}
static inline tmv_t tmv_sub(tmv_t a, tmv_t b)
{
return a - b;
}
static inline tmv_t tmv_zero(void)
{
return (tmv_t) 0;
}
static inline tmv_t correction_to_tmv(Integer64 c)
{
return c >> 16;