Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
88 user(s) are online (57 user(s) are browsing Forums)

Members: 1
Guests: 87

Hypex, more...

Headlines

 
  Register To Post  

Use device .... Update pb
Quite a regular
Quite a regular


See User information
Hi all,

I use timer device and it is correctly initialized. but I get a small 1/2sec freeze each 4 or 5 seconds.
I think it's the way I update the timer to get values.

Here is the function :
Quote:
void AmigaSYS_UpdateTimer( void ){
OldTimer = NewTimer;
ITimer->GetSysTime( MyTimeVal );
NewTimer = MyTimeVal->Microseconds;
}


Do I forgot something ?

Kindest Regards,
AmiDARK.

All we have to decide is what to do with the time that is given to us.
Go to top
Re: Use device .... Update pb
Not too shy to talk
Not too shy to talk


See User information
@freddix

Microseconds only contains the fractional part of the time. This means it could be used as a random number, bot not to measure intervals of multiple seconds.

You would need to use something like

NewTimer = (MyTimeVal->Seconds % 86400) * 1000000 + MyTimeVal->Microseconds;

to get the number of microseconds since midnight.

Go to top
Re: Use device .... Update pb
Quite a regular
Quite a regular


See User information
@thomas
Ok.
Thank you.

All we have to decide is what to do with the time that is given to us.
Go to top

  Register To Post

 




Currently Active Users Viewing This Thread: 1 ( 0 members and 1 Anonymous Users )




Powered by XOOPS 2.0 © 2001-2023 The XOOPS Project