Page 1 of 1
Time limited demo
Posted: Tue Oct 09, 2007 11:03 pm
by dalkin
Has anyone got any advice for time-limiting an app? I need to beta test but I want to limit the experience to 10 days (or so).
Regards,
Posted: Tue Oct 09, 2007 11:57 pm
by Mark
dalkin,
Simply compare the seconds with a value equal to the seconds 10 days from now. Simply put:
Code: Select all
constant kBuildDate = 1191970419 -- 10/10/07
if the seconds > kBuildDate + 864000 then quit
Of course, you probably want to handle quitting in a more sophisticated way.
Best,
Mark
Posted: Wed Oct 10, 2007 12:02 am
by dalkin
Thanks Mark - much appreciated, I'd been fiddling around with system dates and I'd been getting hopelessly lost!
Posted: Wed Oct 10, 2007 12:07 am
by Mark
(note: I made a mistake when pasting a number in my previous post and have corrected this) -Mark