Use Time
to get current time.
If you use unix time, it's as simple as subtracting the saved time from the current.
Lets say you can purchase a cursor object that clicks the clickable every two seconds.
In your save file I assume you would store how many cursor objects the player bought.
Once you have the time difference you check how many times two seconds fit into it, and multiply the result by the number of purchased cursors.