Need help with my code for my project using an Arduino Uno and Processing
You asked for (emphasis mine):


  [...] But once the input goes low, it will save the time OFF (stop)
  on the same line.


That's hard. What if several other inputs have gone HIGH in the
meanwhile? You will have to somehow rewind part of the file, then add
the stop time, the add again the subsequent lines...

You probably do not want to do all this on an Arduino. Especially
considering that the Arduino has no concept of file, unless you add an
SD card and the appropriate library. And it has no concept of time of
day, unless you add an RTC and the appropriate library. I would suggest
you go the easy path:


have the Arduino tell your computer through the Serial port whenever
one of those inputs changes state
write a program in your computer (with processing or whatever) that
reads this information and formats it the way you want.


For the first part, I suggest the following:

/*
 * Tell us when some pins change state.
 */

const int CHANNELS = 4;
const uint8_t pins[CHANNELS] = {8, 9, 10, 11};

void setup()
{
    Serial.begin(9600);
}

void loop()
{
    static int states[CHANNELS];
    for (int i = 0; i &lt; CHANNELS; i++) {
        int state = digitalRead(pins[i]);
        if (state != states[i]) {  // input changed state
            Serial.print("channel ");
            Serial.print(i);
            Serial.print(" going ");
            Serial.println(state ? "HIGH" : "LOW");
            states[i] = state;  // record new state
        }
    }
}


The output will be something like

channel 2 going HIGH
channel 1 going HIGH
channel 2 going LOW
...


For the second part, well, that's not an Arduino-related question
anymore!