millis() question

millis() returns the number of milliseconds that have elapsed since the beginning of your sketch. So each time through the loop, you will print the accumulated time between the start of your sketch and the point in your logic where you assign millis() to the variable time.

That means that you are printing the total elapsed time since your sketch started. That of course includes all the time it takes to execute all the code in your sketch, as westfw says.