I am surprised that your code does what you want.
if(currentMillis - prevm == (interval + 1000))
prevm is initially set to zero and does not change
interval is initially set to zero and does not change
There is a chance that you will miss millis() being exactly equal to 1000
It probably won't matter in your code but it is better to use unsigned longs for timing variables as then you don't run into negative values
If you want an ouput to come on after a defined time then
if (millis() - startTime >= period)
is the way to do it.
Once the output is on you can set startTime to millis() again and set a different period if required . The next time the period ends you can turn off the output and so on. Keep the state of the output in a boolean variable, switch its value at the end of the period and take the appropriate actions for its state.