you can do this with writing your variables with a time offset to the file.
when you start, you set your a variable to the value of total_time
then write your data with the offset (total_time - start_value).
if you read your data, also start with setting up the offset variable
now you read the first time value, wait until (total_time - start_value) >= timeOffsetFromFile, the read your first set of data.
after that read you next offset, wait for it, read the data, and so on...
Hope you get it