I have a helper function that generates a tree and i’m trying to get the
sum of time for each element in the whole tree.
def tree(time)
print element
time = element.time
tree(time)
end function
the script works but i’m having trouble getting the total time. as i
currently have it set up the total_time is reset each time it starts a
new branch.
is there some way i can set up a global variable or something similar in
my helper function so when the tree goes back up a branch i don’t lose
the time calculated for that branch?
you can see what i mean here:
http://wl-dev.kuliksco.com/manufactures/247
i am only getting the total time for the last branch in the tree.