Add time value operations to clear to zero and test for zero.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>master
parent
5f0c034494
commit
e38488ae48
10
tmv.h
10
tmv.h
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue