* Wraps an exec helper in a timer. Returns the result of the helper. * @param {function(string, string=): ?} execFn * @return {function(string, string=): ?}
(execFn)
| 172 | * @return {function(string, string=): ?} |
| 173 | */ |
| 174 | function timedExecFn(execFn) { |
| 175 | return (cmd, ...rest) => { |
| 176 | const startTime = startTimer(cmd); |
| 177 | const p = execFn(cmd, ...rest); |
| 178 | stopTimer(cmd, startTime); |
| 179 | return p; |
| 180 | }; |
| 181 | } |
| 182 | |
| 183 | /** |
| 184 | * Executes the provided command and times it. Errors, if any, are printed. |
no test coverage detected