Sum time field

Sum time field

Is it possible to script for cumulative total of a time field? 

I am using the following script to fetch time from one form to another:

for each  PeopleRecord in People[ID in input.People_lookup]
{
//fetch participation record 
ParticipationRecord = Participation[ID in PeopleRecord.Participation_dates];
//update record
PeopleRecord.No_hours_participated=Time_spent;
}

This only gives me the most recent 'time' from the record. Is there a way of doing a cumulative total time? 

Thanks!