-
Notifications
You must be signed in to change notification settings - Fork 0
Implementation
Marcel Schoen edited this page Nov 19, 2022
·
1 revision
The plugin was designed to be as lightweight as possible. This is how it works:
For every available clock type ("analog", "digital", "digital_lcd" etc.) the plugin keeps 12 buffered images in memory at all times. One for each hour of the day. This is then used to show each player the time according to their chosen time offset.
One single thread is spawned, which sleeps for 60 seconds and then updates all the in-memory images of all the clocks.
All maps that contain a clock of a certain type (e.g. "analog") receive the same buffered image then, so the number of clock maps does not have any impact on the number of clock image updates.