In computer terms, “time slicing” is something else entirely. What you describe is more like a stopwatch function. Use a custom property on your button to hold a “Started” boolean. Your button’s action performed script would then be something like this:
event.source.Started = False
event.source.Started = True
You can use this boolean to also drive styling of your button so it is obvious when the timer is running. If you need to be able to operate this setup from multiple clients, or with window open/close in between, create another tag in the gateway to hold the boolean and bind it bidirectionally to the custom property.