Timer
Hmm, well for the time you could just use this guide:
How to make a colon-separated timer (Difficulty: 🟨)
Then for the wave when the counter reaches the target value (of 0) it activates a negative item granter set to the building blocks so it will take it away when it starts.
Then maybe if you make a timer for how long the wave will be when that timer ends just activate a item granter that grants the blocks. (If you want the player to have the exact amount of blocks as before just make a property that tracks how many blocks the player has and make the item granter grant that using block code)