Paul__B:
The problem with EEPROM is "wear" if you write too often. This makes it impractical to continuously update many times per second.An interesting trick is to use a RTC module such as the cheap DS1307 whose timekeeping is considered poor but which contains CMOS RAM backed up by the coin cell on the module. This means you can (albeit with the delay of the I2C interface) write to it hundreds of times per second "forever" and not lose the tally.
@Paul thank you, but i was thinking about using SPIFFS to do a write/read. are there any documentation i can refer to in order to get a working code ???
thanks for the help