Difference between in_Wait() and msleep()

ZX80, ZX 81, ZX Spectrum, TS2068 and other clones
Post Reply
zx81ultra
Member
Posts: 36
Joined: Thu Feb 13, 2020 1:56 am

Difference between in_Wait() and msleep()

Post by zx81ultra »

Hello,

Is there any difference between in_Wait() and msleep() ?

Thank you !
User avatar
dom
Well known member
Posts: 1185
Joined: Sun Jul 15, 2007 10:01 pm

Post by dom »

zx81ultra wrote:Hello,

Is there any difference between in_Wait() and msleep() ?

Thank you !
I don?t think there is one! I?ll alias in_wait() to msleep() and deprecate it.
stefano
Well known member
Posts: 1534
Joined: Mon Jul 16, 2007 7:39 pm

Post by stefano »

Are you referring to in_waitkey ?
If so the difference is self explained in the function names.
zx81ultra
Member
Posts: 36
Joined: Thu Feb 13, 2020 1:56 am

Post by zx81ultra »

stefano wrote:Are you referring to in_waitkey ?
If so the difference is self explained in the function names.
It's the in_Wait(), my guess is it's the same as msleep()
stefano
Well known member
Posts: 1534
Joined: Mon Jul 16, 2007 7:39 pm

Post by stefano »

Found . They seem to do the same sightly differently.

For what I can see, in_Wait is available only on few targets (timing hardcoded for a 3.5mhz CPU clock) and halts for a given number of milliseconds.

asm_z80_delay_ms apparently does the same but basing on a CPU clock constant making it more portable (and slightly bigger).
Post Reply