A header as the other poster said would be a good place to start. To create the tick you'd probably want to start out with something like this in a custome time header, MyTime.h for example:
1 2 3 4 5 6 7 8
class MyTime
{private:
// 1 _ticks = 1/100 of a second
// 0 _ticks = 00:00:00.00 i.e. 12:00am
// a time is stored as a number of ticks since midnight
// for example 1234567 ticks would be 3:25:45.67am
long _ticks;
You might also add the following for some static fields:
1 2 3 4 5 6 7 8 9 10 11 12
// 8,643,999 _ticks = 23:59:59.99 i.e. 11:59:59.99pm
staticconstlong _lastTickOfTheDay = 8639999;
// 4,320,000 _ticks = 12:00:00.00 i.e 12pm i.e. noon
staticconstlong _noon = 4320000;
// _ticks per second;
staticconstlong _ticksPerSecond = 100;
// _ticks per minute;
staticconstlong _ticksPerMinute = 6000;
// _ticks per hour;
staticconstlong _ticksPerHour = 360000;
// _ticks per day
staticconstlong _ticksPerDay = 8640000;
================================= UAT Online Student - Game Programming