Re: sleep(1): simplify argument parsing

2019-06-30 Thread Ingo Schwarze
Hi Scott, Scott Cheloha wrote on Sun, Jun 30, 2019 at 06:49:28AM -0500: > This is cleaner, shorter. > > - Remove the intermediate variables and just build the timespec >directly. > > - Use for-loops to consolidate initialization/incrementation of cp >into one spot in each loop. > >

sleep(1): simplify argument parsing

2019-06-30 Thread Scott Cheloha
This is cleaner, shorter. - Remove the intermediate variables and just build the timespec directly. - Use for-loops to consolidate initialization/incrementation of cp into one spot in each loop. - Use one loop to parse fractions of a second: less duplicate code keeps the fraction