Detecting time on a sensor

Have a look at the state change detection example in the ide: File > Examples > 2 Digital if my memory serves.

The example's for a switch, so it's looking for high and low; you have an analog sensor so you'll need to apply your mind to how you would do that for analog values.

Then when you can detect a change from flat to flexed or flexed to flat, capture millis() into 2 variables say becameFlexedAt and becameFlatAt or similar.