I did something similar, with a desktop widget called Work, that sets
a variable called %WORK.
This initiates the start task on first tap, second task on second tap.
Tasks are:
Profile: Anon (96)
Event: Variable Set
Enter: Anon (97)
A1: Variable Set [ Name:%START To:%TIMES Do Maths:On Append:Off]
A2: Set Widget Label [ Name:Work Label:Tap to end]
Profile: Anon (98)
Event: Variable Set
Enter: Anon (99)
A1: Variable Set [ Name:%END To:%TIMES Do Maths:Off Append:Off]
A2: Variable Set [ Name:%DURA To:%END- %START/60 Do Maths:On
Append:Off]
A3: Variable Split [ Name:%DURA Splitter:. Delete Base:Off]
A4: Variable Set [ Name:%DURASTART To:%DURA1*-1 Do Maths:On
Append:Off]
A5: Calendar Insert [ In / For (Minutes):%DURASTART/%DURA1
Calendar:Google:Calendar Title:Work Today Description:What I did
Location:Where I did it Available:Off]
A6: Set Widget Label [ Name:Work Label:Tap to start]
A7: Variable Clear [ Name:%WORK Pattern Matching:Off]
A8: Variable Clear [ Name:%DURA* Pattern Matching:On]
A9: Variable Clear [ Name:%START Pattern Matching:Off]
A10: Variable Clear [ Name:%END Pattern Matching:Off]
Start and end times are rounded to the nearest minute, and the second
task creates a calendar entry with a start time equal to when you
first tapped the widget, ending when you tapped it again. And just so
you know where you are at, the label of the widget changes too!
Next thing would be to have a menu appear so you could enter details
of a title, location and description that get assigned to variables
that get used in the calendar entry itself. Might work on that myself
over the next few days and stick it up on the wiki!