<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def do_time(self, params):
 """ \x1b[1mNAME\x1b[0m time - Measures elapsed seconds after running commands \x1b[1mSYNOPSIS\x1b[0m \x1b[1mEXAMPLES\x1b[0m > time 'loop 10 0 "create /foo_ bar ephemeral=false sequence=true"' Took 0.05585 seconds """

        start = time.time()
        for cmd in params.cmds:
            try:
                self.onecmd(cmd)
            except Exception as ex:
                self.show_output("Command failed: %s.", ex)

        elapsed = "{0:.5f}".format(time.time() - start)
        self.show_output("Took %s seconds" % elapsed)