timer.xsh

Time external program execution

<?xml version="1.0" encoding="utf-8"?>
<xsharper xmlns="http://www.xsharper.com/schemas/1.0">
  <usage options="ifHelp ifNoArguments" />
  <param name="args" count="multiple" required="true" last="true" />
  <param description="Usage: timer &lt;command with parameters&gt;" />
  <timer outTo="x">
    <shell ignoreExitCode="true">${=.QuoteArgs($args)}</shell>
  </timer>
  <print outTo="^bold">Elapsed time: ${x}</print>
</xsharper>