Path: csiph.com!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Marko Rauhamaa Newsgroups: comp.lang.python Subject: Re: time module Date: Sun, 08 Nov 2015 13:05:02 +0200 Organization: A noiseless patient Spider Lines: 19 Message-ID: <87vb9cwy3l.fsf@elektro.pacujo.net> References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="b7cb1518d23ec19d482dcc9c31d30fdd"; logging-data="7671"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+WD9w90RGCtCN+l0sgv0PR" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:QguPJPIG/Dq2FH4B4rL4/Y0DU9o= sha1:LCyN2OJkocS/wrF4Fxezj8n+NJQ= Xref: csiph.com comp.lang.python:98439 input/ldompeling@casema.nl: > Yes, I would like seconds since start of program. > Can I not doing something like time()=0 only this gives an error. Here: class MyReckoning: def __init__(self): self.the_beginning = time.time() def time(self): return time.time() - self.the_beginning reckoning = MyReckoning() print(reckoning.time()) Marko