<br><br><div><span class="gmail_quote">On 8/15/07, <b class="gmail_sendername">Robert Collins</b> <<a href="mailto:robertc@robertcollins.net">robertc@robertcollins.net</a>> wrote:</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Adding a second timer might be useful, but I think an easier thing to do<br>for the logging case is to just show the time since the last printout,<br>which is perhaps what you mean your code does.<br><br>As we have an object we can set state, so how about:
<br>if debugging:<br> duration = Duration()<br> duration.start()<br> duration.show_since_last_print(True)<br>...<br>if debugging:<br> mutter("... %s", ..., duration)<br>...<br>if debugging:<br> mutter("... %s", ...., duration)
<br><br>where this would output strings like "4m2secs total, 25secs incremental"<br></blockquote></div><br>yip, this is more or less what I was after (acturally just more :)<br><br>maybe<br>- duration = Duration()
<br>- duration.start()<br>- duration.show_since_last_print(True)<br><br>+ duration = Duration(start=True, show_since_last_print=True)<br><br>regards<br>marius<br>