Page 1 of 1

Get Milliseconds

Posted: Fri May 23, 2003 5:17 am
by Wacky
Hello.
For a sleep-function i need milliseconds. How can i read this out. I experimented with the CMOS but i don't found anything..

What port is needed to get the milliseconds??

Code: Select all

outportb(0x??,?);      
ms= inportb(0x??);
thx and cheers.. Wacky

Re:Get Milliseconds

Posted: Fri May 23, 2003 8:38 am
by Pype.Clicker
there's no millisecond on the realtime clock.
you may keep track of them yourself by reprogramming the Programmable Interval Timer so that it ticks at 1KHz, or something alike.

Note that if you reprogram it at 250Hz instead, just increment the millisecond count by 4 every IRQ0 :p