That is the "blink without delay" method of timing with millis(). I does non-blocking timing (replaced the delay() in your code).
These tutorials have more about how to do non-blocking programming.
Several things at a time.
Beginner's guide to millis().
Blink without delay().