jany2222
asked on
Timimg in php
I want to write the script that allow user to playing the simple puzzle game but the amount of time. For example the game start at 10:30 and support to be finished 2 hours later i.e 12:30 after that time the score will not be calculate. Could anyone tell me how to implement such a thing. Thank you
P/s i already wrote the game i just need to do the calculating score system.
P/s i already wrote the game i just need to do the calculating score system.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
startTime = ....;
endTime = startTime + 120;
do {
/* game code */
nowTime = ....;
} while (nowTime < endTime);