control with wire as button

I have one wire that pullUpDnControl(button_pin, PUD_UP); in gpio pin ,I want if connect to gpio pin and then connect ground pin (like button)do something if in <10000 millisecond wire connect and do something else if in >10000 millisecond wire connect,I write this code but doesn’t change mode after 10000 millisecond ,how can go to start of function, get new start=millis(); and change mode every time relation with <10000 , >10000. can do it with out time(start,wait)???

    void press(int pin_1, int pin_2, int key, int button_pin) {
       int reading,  reading0;
       int lastReading = HIGH;
       long start,wait;

       printf("connect button\n");
       reading = digitalRead(button_pin);
       printf("reading:%d\n", reading);

       if ((reading == HIGH) && (lastReading == HIGH)) {
          start = millis();

          while(true){
          reading0 = digitalRead(button_pin);
          printf("reading0:%d\n", reading0);
       if((reading0==LOW) && (lastReading==HIGH)){
          wait = millis();
          
          //short press
          if (wait - start<=10000) {
             //do something
             
          }

          //held key
          else if ( wait- start>10000) {
             //do some thing else
          }

       }

       }

    }
    }

I have one wire that pullUpDnControl(button_pin, PUD_UP); in raspberry gpio pin

I have no idea what that means, or why you are asking a question about your Ford on the Chevy forum.

isan:
I have one wire that pullUpDnControl(button_pin, PUD_UP); in gpio pin ,I want if connect to gpio pin and then connect ground pin (like button)do something if in <10000 millisecond wire connect and do something else if in >10000 millisecond wire connect,I write this code but doesn’t change mode after 10000 millisecond ,how can go to start of function, get new start=millis(); and change mode every time relation with <10000 , >10000. can do it with out time(start,wait)???

google the phrase “run-on sentence” and try to understand why your translation into english is difficult to understand.

separate your statements into single phrases/ideas.