Login
Username:

Password:

Remember me



Lost Password?

Register now!

Sections

Who's Online
48 user(s) are online (32 user(s) are browsing Forums)

Members: 2
Guests: 46

Futaura, Elwood, more...

Support us!

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 )



Polls
Running AmigaOS 4 on?
AmigaOne SE/XE or microA1
Pegasos2
X5000
X1000
A1222
Sam 440/460
Classic PowerPC Amiga
WinUAE emulation
Qemu emulation
Total Votes: 214
The poll will close at 2025/12/1 12:00
6 Comments


Powered by XOOPS 2.0 © 2001-2024 The XOOPS Project