Re: Typo(s) in sys/time.h ?

2017-01-04 Thread Paul Goyette
One last comment on this: Other than this header, the only other place in our source tree where either us2bintime() or ms2bintime() is referenced is in ./tests/usr.bin/xlint/lint1/d_c99_compound_literal_comma.c This file is not ever compiled, but simply contains sample code for testing

Re: Typo(s) in sys/time.h ?

2017-01-04 Thread Paul Goyette
On Thu, 5 Jan 2017, Paul Goyette wrote: Currently, we have static __inline struct bintime ms2bintime(uint64_t ms) { struct bintime bt; bt.sec = (time_t)(ms / 1000U); bt.frac = (((ms % 1000U) >> 32)/1000U) >> 32; return bt; } As far as I can tell, this will result

Typo(s) in sys/time.h ?

2017-01-04 Thread Paul Goyette
Currently, we have static __inline struct bintime ms2bintime(uint64_t ms) { struct bintime bt; bt.sec = (time_t)(ms / 1000U); bt.frac = (((ms % 1000U) >> 32)/1000U) >> 32; return bt; } As far as I can tell, this will result in bt.frac always set to zero, since t

Re: A nit-pick on gettime(9) man-page

2017-01-04 Thread Edgar Fuß
> Depends on wether you ask a mathematician: [...] > - increasing means ">" I am a mathematician. I'm only sure about german terminology, but here ,,monoton steigend'' means x>y => f(x)>=f(y). If you want f(x)>f(y), that's ,,streng monoton steigend''.

Re: A nit-pick on gettime(9) man-page

2017-01-04 Thread Michael van Elst
p...@whooppee.com (Paul Goyette) writes: > The system realtime clock is guaranteed to be monotonically > increasing at all times. As such, all calls to these functions > are guaranteed to return a system time greater than or equal to > the system time returned in any previ

Re: A nit-pick on gettime(9) man-page

2017-01-04 Thread Timo Buhrmester
> A "monotonically increasing" function would guarantee a results that is > strictly greater than any previous results. AFAIK "monotonically increasing" and "non-decreasing" are synonyms which both allow for constant sections, without which it could be called "strictly increasing".

Re: A nit-pick on gettime(9) man-page

2017-01-04 Thread Joerg Sonnenberger
On Wed, Jan 04, 2017 at 05:10:38PM +0800, Paul Goyette wrote: > > The system realtime clock is guaranteed to be monotonically > increasing at all times. As such, all calls to these functions > are guaranteed to return a system time greater than or equal to > the system tim

Re: A nit-pick on gettime(9) man-page

2017-01-04 Thread Johnny Billquist
On 2017-01-04 10:10, Paul Goyette wrote: The system realtime clock is guaranteed to be monotonically increasing at all times. As such, all calls to these functions are guaranteed to return a system time greater than or equal to the system time returned in any previous calls. T

A nit-pick on gettime(9) man-page

2017-01-04 Thread Paul Goyette
The system realtime clock is guaranteed to be monotonically increasing at all times. As such, all calls to these functions are guaranteed to return a system time greater than or equal to the system time returned in any previous calls. The guarantee to return a r