Restrict user play time ?

May I know how to go about restricting user play time?

For example, I want the user to only be able to play the game three times a day. The game will be deployed online (web player).

Any idea how?

Appreciate your input, thanks !!

Record the time the player spends in the game. Encrypt that and write to a player pref. When they next start the game, check the time you’ve stored and see if it violates your time limit.