xboxscene.org forums

Author Topic: Time Is On My Side...  (Read 49 times)

jfuller

  • Archived User
  • Newbie
  • *
  • Posts: 47
Time Is On My Side...
« 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
Logged

jfuller

  • Archived User
  • Newbie
  • *
  • Posts: 47
Time Is On My Side...
« Reply #1 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.
Logged

jfuller

  • Archived User
  • Newbie
  • *
  • Posts: 47
Time Is On My Side...
« Reply #2 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
Logged

BenJeremy

  • Archived User
  • Hero Member
  • *
  • Posts: 5645
Time Is On My Side...
« Reply #3 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....
Logged

jfuller

  • Archived User
  • Newbie
  • *
  • Posts: 47
Time Is On My Side...
« Reply #4 on: February 28, 2003, 03:26:00 AM »

cool.gif

Thanks once again! beerchug.gif
Logged