How to set up a widget in harlowe

Twine version 2
Harlowe 3.3.3

Hello i am currently trying to get a time system set up in my story and need help with creating a widget
Example of time system: i want a time system that advances the time by 5 mins every passage. I think i have found the code to do so but i can’t say for sure. I just need help in understanding what a widget is and how to create a widget.

The fact you mention the term widget likely means that the example code you found is designed to be used with the SugarCube story format, because Harlowe doesn’t have the direct equivalent of a “widget”. It does however support the creation of “custom macros” using the (macro:) macro

If you supply a link to the “time system” you found then someone on this forum may be able to create a Harlowe variation of it.

note: Harlowe has been deliberately designed to restrict an Author’s ability to use JavaScript to extend the functionality of a project, or that of the story format’s engine itself. So if the “time system” you found relies on using JavaScript in any way then some effort will required to make it Harlowe compatible.