@property<EOL><INDENT>def elapsed(self):<DEDENT>
if self.end is None:<EOL><INDENT>return self() - self.end<EOL><DEDENT>return self.end - self.start<EOL>
:return: duration in seconds spent in the context.
:rtype: float