Sorry about that. I typed on the spot and didn't really copy my code from notepad.
#include <Servo.h>
Servo servo1;
unsigned long time1;
unsigned long condition1;
const int button1 = 17;
int bstate1 = 0;
int laststate1 = 0;
int count1 = 100;
void setup(){
pinMode (button1, INPUT);
servo1.attach(9);
}
void loop(){
millis();
bstate1 = digitalRead(button1);
if(bstate1 != laststate1){
if(bstate1 == HIGH){
time1 = millis();
servo1.write(100);
}
}
laststate1 = bstate1;
condition1 = millis() - time1;
if (condition1 == 1000){
Serial.print("condition = ");
Serial.println(condition1);
servo1.write(0);
count1--;
}