Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

The answer was simpler than I thought it would be. Credit to John BJohn B, one can use a sub-shell (...) for this:

➜ time (sleep $(sleep 3; echo 1)) ( sleep $(sleep 3; echo 1); ) 0.00s user 0.00s system 0% cpu 4.007 total 

The answer was simpler than I thought it would be. Credit to John B, one can use a sub-shell (...) for this:

➜ time (sleep $(sleep 3; echo 1)) ( sleep $(sleep 3; echo 1); ) 0.00s user 0.00s system 0% cpu 4.007 total 

The answer was simpler than I thought it would be. Credit to John B, one can use a sub-shell (...) for this:

➜ time (sleep $(sleep 3; echo 1)) ( sleep $(sleep 3; echo 1); ) 0.00s user 0.00s system 0% cpu 4.007 total 
edited body
Source Link
arekolek
  • 382
  • 2
  • 13

The answer was simpler than I thought it would be. Credit to John B, one can use a sub-shell (...) for this:

 time (sleep $(sleep 3; echo 1)) ( sleep $(sleep 3; echo 1); ) 0.00s user 0.00s system 0% cpu 4.007 total 

The answer was simpler than I thought it would be. Credit to John B, one can use a sub-shell (...) for this:

 time (sleep $(sleep 3; echo 1)) ( sleep $(sleep 3; echo 1); ) 0.00s user 0.00s system 0% cpu 4.007 total 

The answer was simpler than I thought it would be. Credit to John B, one can use a sub-shell (...) for this:

 time (sleep $(sleep 3; echo 1)) ( sleep $(sleep 3; echo 1); ) 0.00s user 0.00s system 0% cpu 4.007 total 
Source Link
arekolek
  • 382
  • 2
  • 13

The answer was simpler than I thought it would be. Credit to John B, one can use a sub-shell (...) for this:

✗ time (sleep $(sleep 3; echo 1)) ( sleep $(sleep 3; echo 1); ) 0.00s user 0.00s system 0% cpu 4.007 total