Skip to content
Snippets Groups Projects
Unverified Commit 2d4f2891 authored by qashlan's avatar qashlan Committed by GitHub
Browse files

Add method to get current server time in milliseconds in ModuleApi (#18144)

- Add `get_current_time_msec()` method to the [module
API](https://matrix-org.github.io/synapse/latest/modules/writing_a_module.html

)
for sound time comparisons with Synapse.
- Fixes #18104 

Signed-off-by: default avatarAhmed Qashlan <ahmedelqashlan@gmail.com>
Co-authored-by: default avatarEric Eastwood <madlittlemods@gmail.com>
Co-authored-by: default avatarErik Johnston <erikj@jki.re>
parent 12dc6b10
No related branches found
No related tags found
No related merge requests found
Add `get_current_time_msec()` method to the [module API](https://matrix-org.github.io/synapse/latest/modules/writing_a_module.html) for sound time comparisons with Synapse.
\ No newline at end of file
...@@ -1846,6 +1846,10 @@ class ModuleApi: ...@@ -1846,6 +1846,10 @@ class ModuleApi:
deactivation=deactivation, deactivation=deactivation,
) )
def get_current_time_msec(self) -> int:
"""Returns the current server time in milliseconds."""
return self._clock.time_msec()
class PublicRoomListManager: class PublicRoomListManager:
"""Contains methods for adding to, removing from and querying whether a room """Contains methods for adding to, removing from and querying whether a room
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment