Link to home
Start Free TrialLog in
Avatar of jack_p50
jack_p50

asked on

I need good timer

I need good timer, fast-working and high-resolution (not lower 72 Hz). Not this :
function getclock: longint;assembler;
asm
  xor   ah,ah           { get tick count from Dos and use For hi 3 Bytes }
  int   01Ah            { lo order count in DX, hi order in CX }
  mov   ah,dl
  mov   dl,dh
  mov   dh,cl
  xor   al,al           { read lo Byte straight from timer chip }
  out   43h,al          { latch count }

  mov   al,1
  out   43h,al          { set up to read count }
  in    al,40h          { read in lo Byte (and discard) }
  in    al,40h          { hi Byte into al }
  neg   al              { make it so counting up instead of down }
end;
and this :
function currenttime : longint;assembler;
asm
  mov   es,[seg0040]
  mov   ax,es:[6Ch]
  mov   dx,es:[6Eh]
end;
Avatar of The_Brain
The_Brain

I could give you one.
Avatar of jack_p50

ASKER

when i use getclock, my images etc.. flickers sometimes, and currenttime is to low-res
ASKER CERTIFIED SOLUTION
Avatar of The_Brain
The_Brain

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
thanx
It is always a pleasure to work with someone who checks their question frequently :)  I find it so frustrating I am still waiting for 4 people to grade me in various places,some are weeks old. :(

oh well thanks man. :)
:)