Here's the sample form.
At the submit button, it triggers a centralized submit logic on the Submit node of the FormLogic group. Here you will see a set of actions. Basically, before the form submits, the action starts the timer, initiates the count, and gets the elapsed time.
The query button on the other hand only gets the elapsed time. We can perform other actions using the elapsed time as a condition.