A timelock is used in smart contracts as a way to restrict the spending of some tokens until a specified future time or block number.
Some solutions to the problem are described below, from the most primitive to the best we came up with. Note that the term expiration time is used, but it can also refer to block numbers.