Would it decrease the server performance to update a .json file every second? For example a timer for 20 minutes lowering every second until 0
That wouldn't really affect the perfomance of the server Anyway why don't you just make a global variable instead of updating it inside a .json
Yes, reading/writing directly from/to disk is a heavy process and doing it that frequently is inefficient. Think of it like saving the world everytime a player sets or breaks a block.
to clarify this ↑ : writing to disk is time-consuming. Also, beware that apparently small timescales (e.g. 10ms) are not really small. When you consider that a full server tick takes 50ms, taking 10ms per tick to write to disk is wasting 20% of your main thread time. (Disclaimer: the number 10ms is arbitrary and I pulled it out of my ass to make a point.)