Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AsyncIOSelectorReactor.seconds() returns incorrect value #9787

Closed
twisted-trac opened this issue Mar 27, 2020 · 3 comments
Closed

AsyncIOSelectorReactor.seconds() returns incorrect value #9787

twisted-trac opened this issue Mar 27, 2020 · 3 comments

Comments

@twisted-trac
Copy link

richvdh's avatar @richvdh reported
Trac ID trac#9787
Type defect
Created 2020-03-27 14:17:10Z

The [[https://twistedmatrix.com/documents/20.3.0/api/twisted.internet.interfaces.IReactorTime.html#seconds|documentation]] doesn't make it explicit, but apparently IReactorTime.seconds() is meant to return an epoch time. AsyncIOSelectorReactor.seconds() returns a monotonic time:

python3 -c 'from twisted.internet import asyncioreactor; print(asyncioreactor.AsyncioSelectorReactor().seconds())'
41116.763594412
Searchable metadata
trac-id__9787 9787
type__defect defect
reporter__richvdh richvdh
priority__normal normal
milestone__None None
branch__ 
branch_author__ 
status__closed closed
resolution__fixed fixed
component__core core
keywords__None None
time__1585318630876671 1585318630876671
changetime__1585571184650361 1585571184650361
version__None None
owner__hawkowl hawkowl

@twisted-trac
Copy link
Author

richvdh's avatar @richvdh commented

Pr for this over at #1237.

@twisted-trac
Copy link
Author

hawkowl's avatar @hawkowl set owner to @hawkowl

Seems fine to me. Does what the other reactors do, so...

@twisted-trac
Copy link
Author

Richard van der Hoff's avatar Richard van der Hoff set status to closed

In changeset be66f18

#!CommitTicketReference repository="" revision="be66f18fde8aba632117e0bf685638984377150e"
Merge 9787-asyncioselectorreactor-seconds: Make asyncioreactor.seconds() return an epoch time

Author: richvdh
Reviewer: hawkowl
Fixes: ticket:9787

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants