unsigned long StartTime = millis();
unsigned long CurrentTime = millis();
unsigned long ElapsedTime = CurrentTime - StartTime;
That will give you the elapsed time in milliseconds, up to about 40 days. If you need more precise measurement you can use 'micros()' instead of ''millis()' to get microseconds, up to a couple of hours, I think.
The Arduino clock isn't very accurate so your timing may be off by minutes a day.