Now, there would be strict set of rules around this. The clock would only start once the referee has placed the ball where the foul occurred or allowed a player to do so. Once this has taken place the referee would mark out the required 10 yards for the wall to be taken back. This would all take a max of 5 seconds the players then have 10 seconds to take the kick. Keepers could set up walls prematurely and players could have their pre kick meeting whilst the referee is doing all this, or it could be something pre-determined before kickoff.
If the defensive team purposely delays the restart by constantly creeping within 10 yards or not giving the ball back, then they would receive a delay of game warning. This could be a verbal warning, followed by a yellow card to the offending player if it continues and potentially a send off if that player is already on a yellow. If it is the wall, then all players within the wall would go through that process listed in the sentence before.
If the offensive team takes too long, then one of two actions could take place. Either the free kick could be reversed similar to foul throws or in futsal when players fail to take restarts within 4 seconds. Alternatively, the ball could simply become live after the 15 seconds is up similar to AFL where a player who has taken a mark only has a certain time to play the ball before the umpire waves play on.
This system could easily work for corners and goal kicks where the clock starts when the ball has gone out. It would need to be adjusted for the different match ball systems. I think 30 seconds for single match ball leagues and 15 for multi match ball leagues (allowances for dodgey ball boys would be up to the discretion of the referee). Personally, I am a fan of the live ball scenario. This system could also be used for throw ins however instead of a live ball, the throw in would simply swap sides.
Penalties require more time to set up, especially if it is a VAR reviewed penalty. So maybe 30 or 45 seconds for penalties. Anyone found to be encroaching or the keeper coming of his line would go through the same delay of game warning process above.