I have data that needs to be recorded every second, so I put in a wait timer for 1000 ms. After reviewing my data I found that it would skip a second here or there and was therefore not continuous. I need the data to be continuous so that I can upload it to a server that operates off of UTC time down to the second. It could be the case that each point is off by a tenth of a millisecond and causes each point to be off by more and more. I'm not sure how to deal with this.
Code is attached. It is the first while loop at the top that I am concerned about, (SO2) readings.