How would I go about setting a period of time for arduino to measure something?

I would love to have arduino read voltage values for one minute, and then stop.

Is there a code for this? Im a beginner and just trying to figure that out.

I have the analogread command down for reading an analog input ovltage, i was just wondering if there was a way to stop the code either when 1 minute passed, or if thats not possible, stop after "x values have been read", assuming that the arduino reads at a (mostly) constant rate over a minute

The Arduino can do this easily.

Use millis() to get the current time, probably in setup(). Call this startTime.
In loop(), quit taking measurements once millis()-startTime is greater than 60000 milliseconds.

Any variables having to do with time should be declared as unsigned long. Any calculations done with these variables should be using subtraction only, NOT addition.

I am not sure what you mean by "stop", but

while (true);

will prevent the Arduino from doing anything else.

The demo Several Things at a Time illustrates the use of millis to manage timing.

The technique is also used in Planning and Implementing a Program

...R