Using a mapped value which is then ramped analog output

WizenedEE:
That's about what I guessed. Try implementing what I described in the last two paragraphs of my post and come back with questions about how to do so

This is my first attempt at the code.
How does it look?

void loop () {

if (button == HIGH && time <= millis() ){

int time = millis();

}

else if (button == HIGH && time > millis() ){

int buttontime = millis()-time;

ramp = map(buttontime, time, 1000, 0, 255);  // after 1 second give full pwm output

}

else if (button == LOW) {

time = 0;

}