How accurate are delays within loops

if(millis() - lastTime >= interval)

The really crucial part is to get the right comparison.