mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 21:44:52 -04:00
Merge branch 'develop' of github.com:matrix-org/synapse into timeout-federation-requests
This commit is contained in:
commit
fb233dc40b
172 changed files with 8760 additions and 3923 deletions
|
@ -15,7 +15,7 @@
|
|||
|
||||
from synapse.util.logcontext import LoggingContext
|
||||
|
||||
from twisted.internet import defer, reactor
|
||||
from twisted.internet import defer, reactor, task
|
||||
|
||||
import time
|
||||
|
||||
|
@ -35,6 +35,14 @@ class Clock(object):
|
|||
"""Returns the current system time in miliseconds since epoch."""
|
||||
return self.time() * 1000
|
||||
|
||||
def looping_call(self, f, msec):
|
||||
l = task.LoopingCall(f)
|
||||
l.start(msec/1000.0, now=False)
|
||||
return l
|
||||
|
||||
def stop_looping_call(self, loop):
|
||||
loop.stop()
|
||||
|
||||
def call_later(self, delay, callback):
|
||||
current_context = LoggingContext.current_context()
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue