Sub Calculate
Sum = Sum + SomeValue
Draw 'Call this routine when Calculate is done
End Sub
Sub Draw
Plot(X,45) 'I know is fake but...you get my point
Update 'Call this routine when Draw is done
End Sub
Sub Update
Open something, update, process
Calculate 'Restart the process
End Sub