Re: time(1): use monotonic clock for computing elapsed time

2017-07-22 Thread Anton Lindqvist
On Sat, Jul 22, 2017 at 10:19:22AM +0200, Anton Lindqvist wrote: > On Fri, Jul 21, 2017 at 04:34:53PM -0500, Scott Cheloha wrote: > > ~1 week bump. Changes to time(1) were committed by tedu@. > > > > Any feedback on the ksh/csh portions of the patch? > > Looks good. I'm willing to commit this di

Re: time(1): use monotonic clock for computing elapsed time

2017-07-22 Thread Anton Lindqvist
On Fri, Jul 21, 2017 at 04:34:53PM -0500, Scott Cheloha wrote: > ~1 week bump. Changes to time(1) were committed by tedu@. > > Any feedback on the ksh/csh portions of the patch? Looks good. I'm willing to commit this diff if I can get another ok.

Re: time(1): use monotonic clock for computing elapsed time

2017-07-21 Thread Scott Cheloha
~1 week bump. Changes to time(1) were committed by tedu@. Any feedback on the ksh/csh portions of the patch? -- Scott Cheloha

Re: time(1): use monotonic clock for computing elapsed time

2017-07-13 Thread Mike Belopuhov
On Thu, Jul 13, 2017 at 13:44 +1000, David Gwynne wrote: > > > On 13 Jul 2017, at 11:16 am, Scott Cheloha wrote: > > > > Hi, > > > > The "real" elapsed time for time(1) and the ksh/csh time builtins is > > currently computed with gettimeofday(2), so it's subject to changes > > by adjtime(2) and

Re: time(1): use monotonic clock for computing elapsed time

2017-07-12 Thread David Gwynne
> On 13 Jul 2017, at 11:16 am, Scott Cheloha wrote: > > Hi, > > The "real" elapsed time for time(1) and the ksh/csh time builtins is > currently computed with gettimeofday(2), so it's subject to changes > by adjtime(2) and, if you're really unlucky, clock_settime(2) or > settimeofday(2). In pa

Re: time(1): use monotonic clock for computing elapsed time

2017-07-12 Thread Scott Cheloha
Whoops, prior diff for usr.bin/time/time.c has a dumb typo, corrected diff attached. -- Scott Cheloha Index: usr.bin/time/time.c === RCS file: /cvs/src/usr.bin/time/time.c,v retrieving revision 1.21 diff -u -p -r1.21 time.c --- usr.b

time(1): use monotonic clock for computing elapsed time

2017-07-12 Thread Scott Cheloha
Hi, The "real" elapsed time for time(1) and the ksh/csh time builtins is currently computed with gettimeofday(2), so it's subject to changes by adjtime(2) and, if you're really unlucky, clock_settime(2) or settimeofday(2). In pathological cases you can get negative values in the output. This see