If you prefer not to mess up with DIY stuff, you can buy a stainless steel version from Extremerestraints
This is an exerpt from the description:
The finely crafted stainless steel lock will help you satisfy your bondage needs even when you're the only one in the room... Using this time lock is easy. Simply fill the lock's chamber full of water and then freeze the entire device, when the water freezes the ice keeps the chamber from sliding out. You can also adjust the duration of the session by adding less water (at full capacity the lock can stay locked for approximately 2 hours!). This lock can be attached to any of our lockable restraints and with a little creativity, it will add a whole new level of play to your sessions.
To view Aliexpress you might need to switch your mobile browser to the Desktop version.