Hacker News new | past | comments | ask | show | jobs | submit login

Yes, as a consequence, it also lets you do this:

    time {
      sleep 0.1
      sleep 0.2
    }
    # result is 0.3 seconds
 
which you obviously can't do with an external command. I wrote about that here:

https://lobste.rs/s/hwgt2h/usr_bin_time_not_command_you_thin...




The `time` syntax in combination with for loops or just shell functions is pretty useful as well.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: