Re: [PATCH weston 1/7] timespec: Add timespec_add_nsec helper

2017-02-20 Thread Pekka Paalanen
On Fri, 17 Feb 2017 15:56:47 + Daniel Stone wrote: > Hi, > > On 14 February 2017 at 14:09, Pekka Paalanen wrote: > > On Tue, 14 Feb 2017 13:18:01 + > > Daniel Stone wrote: > >> +ZUC_TEST(timespec_test, timespec_add_nsec) > >> +{ > >> + struct timespec a, r; > > > > An array and

Re: [PATCH weston 1/7] timespec: Add timespec_add_nsec helper

2017-02-17 Thread Daniel Stone
Hi, On 14 February 2017 at 14:09, Pekka Paalanen wrote: > On Tue, 14 Feb 2017 13:18:01 + > Daniel Stone wrote: >> +ZUC_TEST(timespec_test, timespec_add_nsec) >> +{ >> + struct timespec a, r; > > An array and a loop to ease readability? :-) I had a flash of doing this, and remembered why

Re: [PATCH weston 1/7] timespec: Add timespec_add_nsec helper

2017-02-14 Thread Daniel Stone
Hi, On 14 February 2017 at 15:02, Pekka Paalanen wrote: > On Tue, 14 Feb 2017 14:21:17 + > Daniel Stone wrote: >> On 14 February 2017 at 14:09, Pekka Paalanen wrote: >> > On Tue, 14 Feb 2017 13:18:01 + >> > Daniel Stone wrote: >> >> +static inline void >> >> +timespec_add_nsec(struct t

Re: [PATCH weston 1/7] timespec: Add timespec_add_nsec helper

2017-02-14 Thread Pekka Paalanen
On Tue, 14 Feb 2017 14:21:17 + Daniel Stone wrote: > Hi, > > On 14 February 2017 at 14:09, Pekka Paalanen wrote: > > On Tue, 14 Feb 2017 13:18:01 + > > Daniel Stone wrote: > >> Add a (timespec) = (timespec) + (nsec) helper, to save intermediate > >> conversions to nanoseconds in its

Re: [PATCH weston 1/7] timespec: Add timespec_add_nsec helper

2017-02-14 Thread Daniel Stone
Hi, On 14 February 2017 at 14:09, Pekka Paalanen wrote: > On Tue, 14 Feb 2017 13:18:01 + > Daniel Stone wrote: >> Add a (timespec) = (timespec) + (nsec) helper, to save intermediate >> conversions to nanoseconds in its users. > > I recall some comments about using timespec over int64_t nanos

Re: [PATCH weston 1/7] timespec: Add timespec_add_nsec helper

2017-02-14 Thread Pekka Paalanen
On Tue, 14 Feb 2017 13:18:01 + Daniel Stone wrote: > Add a (timespec) = (timespec) + (nsec) helper, to save intermediate > conversions to nanoseconds in its users. > > Signed-off-by: Daniel Stone Hi, I recall some comments about using timespec over int64_t nanoseconds being over-engineeri

[PATCH weston 1/7] timespec: Add timespec_add_nsec helper

2017-02-14 Thread Daniel Stone
Add a (timespec) = (timespec) + (nsec) helper, to save intermediate conversions to nanoseconds in its users. Signed-off-by: Daniel Stone --- Makefile.am| 10 shared/timespec-util.h | 21 + tests/timespec-test.c | 126 +