Re: [Twisted-Python] IReactorTime.seconds: epoch time or no?

2020-03-27 Thread Richard van der Hoff
On 26/03/2020 09:23, Barry Scott wrote: Why does Twisted need to duplicate the built in python time features? > What was wrong with using time.time() for the access logs? I feel like glyph's already answered this: use of `time` makes for poor testability. You might argue you don't care for

Re: [Twisted-Python] IReactorTime.seconds: epoch time or no?

2020-03-26 Thread Barry Scott
On Wednesday, 25 March 2020 07:02:46 GMT Glyph wrote: > > On Mar 24, 2020, at 4:05 PM, Tom Most wrote: > > > > I'll offer a dissenting opinion: > > > > I've worked on systems where the reactor is patched to use monotonic time. > > (This is essential on embedded systems that lack a real-time

Re: [Twisted-Python] IReactorTime.seconds: epoch time or no?

2020-03-25 Thread Glyph
> On Mar 24, 2020, at 4:05 PM, Tom Most wrote: > > I'll offer a dissenting opinion: > > I've worked on systems where the reactor is patched to use monotonic time. > (This is essential on embedded systems that lack a real-time clock.) I'm not > aware of this causing any issues, and it fixed

Re: [Twisted-Python] IReactorTime.seconds: epoch time or no?

2020-03-24 Thread Tom Most
I'll offer a dissenting opinion: I've worked on systems where the reactor is patched to use monotonic time. (This is essential on embedded systems that lack a real-time clock.) I'm not aware of this causing any issues, and it fixed real problems. HTTPFactory is quite unusual in assuming that

Re: [Twisted-Python] IReactorTime.seconds: epoch time or no?

2020-03-23 Thread Amber Brown (hawkowl)
On 24/3/20 6:45 am, Richard van der Hoff wrote: HTTPFactory seems to think that `reactor.seconds` is reliably an epoch time (see https://github.com/twisted/twisted/blob/trunk/src/twisted/web/http.py#L3110, etc). On the other hand. AsyncioSelectorReactor.seconds() returns a monotonic time: