Get Milliseconds

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
Wacky

Get Milliseconds

Post 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
User avatar
Pype.Clicker
Member
Member
Posts: 5964
Joined: Wed Oct 18, 2006 2:31 am
Location: In a galaxy, far, far away
Contact:

Re:Get Milliseconds

Post 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
Post Reply