-
Notifications
You must be signed in to change notification settings - Fork 284
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
Use per-instance Mono_Time
instead of a global unix_time
#1038
Conversation
62a6253
to
328f3ed
Compare
Mono_Time
for Messenger and onion.Mono_Time
for Messenger and onion.
f528dc0
to
93fe30b
Compare
Mono_Time
for Messenger and onion.Mono_Time
for Messenger and onion.
I'm so confused, there is no explanation either in PR or the commit message as to why this is needed, what improvement this brings. At first I thought that you moved the Windows'es global state into a per-instance struct, but that's not the case. Also, what is the point of the |
Oh, nevermind, diff of |
I'm having second thoughts on this. Could you explain why this is a positive change? Mono_Time is meant to represent actual unix time. This is a global concept, so doesn't it actually make sense to use a global for it? Meanwhile making it per-instance increases code complexity. Having it as a global also makes time manipulation in tests easier. The only practical advantage I see of making it per-instance is to allow us to model relative clock differences between instances in tests, which I don't anticipate us actually wanting to do. |
14b5321
to
a0dec00
Compare
Mono_Time
for Messenger and onion.Mono_Time
instead of a global unix_time
81b1667
to
cd91b57
Compare
@zugz PTAL. I've added a comment to explain the assumptions we want to make in the event loop. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I'm happy now.
e92e191
to
b715659
Compare
b715659
to
fec8109
Compare
690fb51
to
253b004
Compare
253b004
to
d6d305f
Compare
This avoids some global state.
This change is