xboxscene.org forums

OG Xbox Forums => Software Forums => Development => Topic started by: jfuller on February 27, 2003, 02:32:00 AM

Title: Time Is On My Side...
Post by: jfuller on February 27, 2003, 02:32:00 AM
cool.gif split it in to seconds/minutes etc.

What i need returned is three variables, one containing the seconds, one containing the minutes and.....yep you guessed it...one containing the hours.

Cheers
Jamie
Title: Time Is On My Side...
Post by: jfuller on February 27, 2003, 02:45:00 AM
Sorry guys, Sorted it.

Need to create a systemtime object and call them using

SYETEMTIME SystemTime;
hour=SystemTime.wHour;
Minutes=SystemTime.wMinutes;
Secondsr=SystemTime.wHour;

Thanks anyway.
Title: Time Is On My Side...
Post by: jfuller on February 27, 2003, 11:53:00 PM
Hmmm, hit a problem again,

The time seems to be static?

Requesting the variables again doesnt update the values,

so if I have

min=SystemTime.wMinute;

and then 13 minutes later have

anothermin=SystemTime.wMinute;

min and anothermin are identical, Do I have to call some function to update the SystemTime Struct?

Cheers
Jamie
Title: Time Is On My Side...
Post by: BenJeremy on February 28, 2003, 03:08:00 AM
QUOTE (jfuller @ Feb 28 2003, 03:53 AM)
Hmmm, hit a problem again,

The time seems to be static?

Requesting the variables again doesnt update the values,

so if I have

min=SystemTime.wMinute;

and then 13 minutes later have

anothermin=SystemTime.wMinute;

min and anothermin are identical, Do I have to call some function to update the SystemTime Struct?

Cheers
Jamie

Well, if you are just looking for elapsed time, I always use GetTickCount(), which returns milliseconds since reset.

As for updating your variable, you should be doing a GetSystemTime(&SystemTime); call when you need it to be current....
Title: Time Is On My Side...
Post by: jfuller on February 28, 2003, 03:26:00 AM
cool.gif

Thanks once again! beerchug.gif