while (millis() - firstLoopLength > loopStartTime){
would, in my humble opinion, be better as
while (millis() - loopStartTime < firstLoopLength)
{
Since that more naturally reflects how one would describe the while clause in English.
while (millis() - firstLoopLength > loopStartTime){
would, in my humble opinion, be better as
while (millis() - loopStartTime < firstLoopLength)
{
Since that more naturally reflects how one would describe the while clause in English.