calculate for how long I used a program

I’m new to xojo and very intrigued by its possibilities.
I have some general experience in programming but nothing specific.
What I would like to do is to launch a program from xojo (e.g. Microsoft Word), do what I need to do with Word and then, when I quit word, I should be able to account for how long I have been using that program.
A nice feature would be also to be able to indicate how many “pauses” I took which are exceeding a certain period of time (say 10 minutes for example).
Is that easily doable with xojo?
I thank you in advance for any help in doscovering its possibilities.

A nice feature to use is Microseconds, which counts how many microseconds elapsed since the last machine boot.

You can set a property or variable to the current Microseconds (myvariable = Microseconds), then execute Word, and upon return, simply subtract the property from current Microseconds. This will give you the time spent in Word.

I do not see how you can account for pauses made in Word, though. It would be only possible from within Word, as it does not execute in Xojo.