[Spice-devel] [spice 3/7] server: Add time constants to go with spice_get_monotonic_time_ns()

Francois Gouget fgouget at codeweavers.com
Fri Dec 11 07:30:32 PST 2015


On Fri, 11 Dec 2015, Christophe Fergeau wrote:

> Hey,
> 
> On Fri, Dec 11, 2015 at 12:21:52PM +0100, Francois Gouget wrote:
> > diff --git a/server/utils.h b/server/utils.h
> > index 3aa5be0..cf6b224 100644
> > --- a/server/utils.h
> > +++ b/server/utils.h
> > @@ -50,13 +50,16 @@ static inline int test_bit(int index, uint32_t val)
> >  
> >  typedef int64_t red_time_t;
> >  
> > +#define NS_PER_SECOND      1000000000LL
> > +#define NS_PER_MILLISECOND 1000000LL
> 
> Regarding the naming, maybe we should go with NSEC_PER_SEC and NSEC_PER_MILLISEC for
> consistency with G_USEC_PER_SEC from glib?

Sounds like a good idea.


-- 
Francois Gouget <fgouget at codeweavers.com>


More information about the Spice-devel mailing list