3 ms·
Why would you want to time nothing? What does it output, real 0s user 0s system 0s?
by etatoby 10y ago
Why would you want to time nothing? What does it output, real 0s user 0s system 0s?
- thiagoharry 10y agoWhy would you want to multiply by 1 or sum zero? You probably wouldn't need to do it, but computers and scripts aren't so smart as people and always follow code literally. For them is important a language having less irregularities and exceptional rules. If "" is a valid command and you have the syntax "time [COMMAND];", why not allow "time;"?
- sillysaurus3 10y agoIt might be to avoid errors for scripts like: time ${cmd}; foo where cmd happens to be unset. Conceptually, that's a valid script, because `time` standalone is a valid script. No reason it should generate an error.
- fosk 10y agoNot always the case, I just tried and: $ time real 0m0.002s user 0m0.000s sys 0m0.000s