I think I'm doing pretty much the same
I think yours and eduardo's are different. Your algo will update, render and wait some time as filler to make it 16 millisec per frame (1 update per render with waiting), while eduardo's will update multiple times until 16 millisecs or more has passed before rendering (one or more updates per render without waiting).
For more information, look at the article Fix your timestep! on the internet, it talks about various kinds of game loops.