Tuesday, August 18, 2009

Arrg I'm a pirate, time()

Today was a pretty great day. I got the tick system working in the interface and it seems to be great. To tell how much time there has been a between point a and point b, I store the last time I looked in epoch time and what time it is now in epoch time. I then compare the two times and the difference is how long. You take that times how much you generate per second and you got how many more resources you have gathered between point a and b.

In perl time() will return the servers epoch time.

No comments:

Post a Comment