Tristan Seligmann
2016-03-26 20:33:35 UTC
Currently, as far as I can tell, all implementations of
`IReactorTime.seconds()` (excluding twisted.internet.task.Clock, obviously)
are just `time.time()`; IOW, the return value is the number of seconds
since the beginning of the UNIX epoch in UTC. Are these the intended
semantics? The interface docstring doesn't really make this clear at all.
There's some commented out code which suggests the implementation used to
be `time.clock()` on win32, which would not satisfy these semantics.
(The background for this question is that I'm writing some code which takes
an IReactorTime provider for testing purposes, and I'm wondering if I need
a separate provider of `datetime.now()` functionality or not)
`IReactorTime.seconds()` (excluding twisted.internet.task.Clock, obviously)
are just `time.time()`; IOW, the return value is the number of seconds
since the beginning of the UNIX epoch in UTC. Are these the intended
semantics? The interface docstring doesn't really make this clear at all.
There's some commented out code which suggests the implementation used to
be `time.clock()` on win32, which would not satisfy these semantics.
(The background for this question is that I'm writing some code which takes
an IReactorTime provider for testing purposes, and I'm wondering if I need
a separate provider of `datetime.now()` functionality or not)