Have you considered just running a simple Update loop that saves GetSecondsPlayed() to the ZO_SavedVars every second, or even every 5 seconds (if margin of error of 5 seconds is pretty reasonable)? It doesn't save to the file until reload / logout, and you can be as confident as anyone else is that it will get saved, so you only need to worry about getting the data to the table. It's simple, reasonably efficient, and doesn't require anything fancy.
|