Timer Service


I created a TimerService that broadcast an onTimerUpdate event at a set interval to any UdonBehaviors subscribed to it. This can be used for something like a clock which I originally built it for.

In the public variables for the timer, you can set timerDelay (seconds) which is the broadcast rate of the onTimerUpdate event. Also you can place any amount of UdonBehavior to the timerSubscriber that you want to listen to onTimerUpdate event.
image

In the subscribing UdonBehavior listen to the onTimerUpdate

image

Timer Node Graph:

Timer + Clock Example:

Just the Timer UdonBehavior:

AO1a224bRxL9FWGe2ULfLwL8kMhZQ9hgE0Sy8rAwhL5K3KVmhJmhE8Hxl+3DflJ+ITWkSNGa8bCjiDalXdgwTHJm2H1O1alT1fz9P//9ULy3s3ksjv75oUjz2ewf9hpeFG/LaXv7XXk5LeMP7l/Rt9/Utb09vLh4E9vz7oaLi9Pbpo3XJ2XL6OrF8tJiUsynAR4SvJeOEI6wDwbxZBhy1EkUI0/eYywtS3DxTdVM22lVFkcfil+LI031IZ4Ut8UR4oYe4o+ToqxCfHvyuoFVFkowh5PzKFKvEI/WIcPgycw5Hpw2OCTzG4bHGmpDtIIiL61HnBqDnJEeee+oUtwLoTFc+G5SpFn1y93j3y2/bLHFZgHKvENiubHzJVIfimnZtLb08eR1cdStr2nraXl593FRfJw87rZ33Y0bJJzd3sSL85+O34aqPK6ur6sS0I51sj42J92b372PZftT9HH6PtZr2KmSmnNnkUwSEEoWNi45AEY8jU4KT5UYgJ3jFey0Y+BT2MdRerjwjeh5A+8sYVgGD+zjpiph2auYWWzyYuOO9RXrDdmgXQheIuUJQ9xLirTjFBEThBSOBYv16IYI68dRTnAu4igHzv2Oo+wQAopOYxmO501bXS8+WbF0uviK1avzCnhZseM8DdjHgGhKGnHtLbJY0Q4fQYQIPPjxLGeqz04O5Qt2HuBeMIOFDFbB5Q5oDQTY8iogyTXcggVmSRdfkZ0lgIdLPCcH142v6tnUTQ7OY90APK/4Ie7+TA6O57N2XsdXZZy3tZ1NDn6cu9nU/z3enlX/juUrp5QVXkhiGI9Ym9+q8mx6Heu3N8G2sR8FG3oNPF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8f684s/V1UfDAIeLJBqjLGAah8ChvJolUSOgjvSnEMrJbgneKA83gvM/wcBK4F5Yfm7r+vKHLZn5fxo4n3mBEUKl7TWHhHJIuLUQ64QYyGtuSUiRCwl7Y8DJPMRG0pQcgaWo+AGS10EX4SD9yyBOrh9P0HJkoqd2lBGCXcKbLzDGpjFQIA2VCKtHCYOykUyA2K1Sar5Iod8X52E4UOOpfQPn3ovP/v0xXDFyEmAcRLowFFrTqFcnHPkxMB+n3P0yXhTR/BE9eap0wgfD8+dGBXcCN5h1YUEg/8ZiBgkXDROaAZSZwcIWcw6P39GwqOOOiiFrPQJcRBPBO2yRJQrwRP0x4GLBSEkKqWpSchDU4K418Ah71pFSQRVEKHYpX0iZJWcC0yfODkzdSwH23HGFH/uI8DHCdm4mTXeeQt1HxFCQZqkEsgYTlAkSifFPEjGwJgCEYq/op3dYTySPbXKr+PM3u6hL32BbfgOqWyuq6q9ypS8nCqxpUgNHPk8L8nLkqe89sYQrjxmAZFAurlgMshBx4OEYAxKiMORDdV8cj/V/kx7o6xNUWCNaGTgwxhxyGhYI0saSNJKUmP77U3Wz9X2nJ0v2t58W8PVV/eeOqc9HM2OITpzjGGfy6zQ2veT66WSb3fep3MHD/SP64RycmU8CdnAb4CdY04yGSCDCDxVdj+0F94h5iijCQvrFhk4KTw2mGBvETQ9HBoxKZAjyiCAQmptceCsT+9edUKDlSJn/+OokiET96wqxePM8SCcOVGyBU763H9Bl1t43338Aw==

8 Likes

This looks super useful for my interests!

1 Like

Feel free to use it and improve it!