Use per-instance Mono_Time instead of a global unix_time#1038
Use per-instance Mono_Time instead of a global unix_time#1038iphydf merged 1 commit intoTokTok:masterfrom
Mono_Time instead of a global unix_time#1038Conversation
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. |
e92e191 to
b715659
Compare
b715659 to
fec8109
Compare
690fb51 to
253b004
Compare
253b004 to
d6d305f
Compare
This avoids some global state.
This change is