I'm trying to write a piece of code that will loop every second over a defined time range. I know how to get the time in seconds since 1/1/70 from the help pages but I dont know how to get it to loop every second for say, 5 seconds. If I can get it to print the time every second over 5 seconds I can incorporate it into my main code which will allow a user to ramp the power dissipated in a light bulb over a defined range in a defined time.
here is the code for displaying the time in seconds since 1/1/70;
time( <ime );
printf( "Time in seconds since UTC 1/1/70:\t%ld\n", ltime );