Adding array element in KSH

All,

I would like to add the first 10 elements of an array. Here is how I am doing it now (only included first few add ops):

#!/usr/bin/ksh

###Grab the array values out of a file###
TOTAL=`awk '/time/' /tmp/file.out | awk '{print $4}'`

set -A times $TOTAL
SUM=$((${times[0]} + times[1] + times[2]))

I would like an easier method of adding the elements...

Thanks!

Mike

Bump - please help

$ cat add_array.ksh

#!/bin/ksh

set -A times 1 2 3 4 5 6
TIMESCOUNT=${#times[*]}

print "There are $TIMESCOUNT times elements"
print "times array = ${times[@]}"

TIMESIDX=0
SUM=0
while (( TIMESIDX < TIMESCOUNT ))
do
   SUM=$(($SUM+${times[TIMESIDX]}))
   TIMESIDX=$(($TIMESIDX+1))
done

print "SUM=$SUM"

exit 0

$ ./add_array.ksh
There are 6 times elements
times array = 1 2 3 4 5 6
SUM=21

Much obliged.