I'm trying to set up a timer in my code to say, if this value stored on this variable is older than the actual time run this sql to delete everything from this db-table and do an sql insert to populate new data into the db-table.
How do I set up this timer in order for me to compare the time with the actual time and do my logic there?