That description is inaccurate. There isn’t any option to entry the present time or top from inside the Script language.
As a substitute, there’s a degree of indirection:
- A transactions nLockTime or nSequence enforces an absolute or relative locktime on the transaction.
- The
OP_CHECKLOCKTIMEVERIFY
andOP_SEQUENCEVERIFY
opcodes inside script examine the highest stack component with the transaction’s nLockTime or nSequence worth.
Functionally, collectively these constructions do allow you to successfully write scripts that may implement time constraints. E.g. a script utilizing OP_CHECKLOCKTIMEVERIFY
can require the nLockTime of the spending transaction to be at the very least N, and thereby not directly power the transaction to not be minable till N has handed.
The benefit of this cut up is that transaction script validity is a single boolean worth that solely must be verified as soon as: a transaction’s script validity is both at all times legitimate or at all times invalid.