As @aioobe said, applications have no control over the environment in which they are running.
What you can do (if your program also maintains data that is important to your users) is to record what it knows about the date/time and the passing of time. For instance you can store the current time at a regular interval after checking that it did not rollback (when a rollback is detected, output a message with an encrypted code to pass on to you for relicensing so you know that that happened).
You can also keep a "counter" that is incremented every hour your program runs giving you another way to estimate the usage of your license.
Using all three your license would run out after a year, a rollback or x hours runtime.