Page 1 of 1

counting seconds

Posted: Sun Feb 03, 2008 3:10 pm
by sancho1980
hi

if i set my clock to a rate generator and set the reload value to 0x91A7 and then increment the "number of seconds" counter on every 32nd clock interrupt, that should be correct, or am i doing some calculation wrong?

im running on bochs and to me it seems seconds are passing *way* to fast (maybe even twice as fast as they should)...is that due to some inaccuracy with bochs or are my calculations wrong?

Posted: Sun Feb 03, 2008 3:24 pm
by lukem95
bochs timer is always fast, you can sync it to real time and it should be normal.

Try it with another emulator

Posted: Mon Feb 04, 2008 9:40 am
by Combuster
bochs is by default set for speed and repeatability. i.e. time passes as fast as bochs can make it pass

to fix this, either use the realtime or the slowdown timer. The realtime one is faster, the slowdown is more accurate. check your bochs config for the IPS and clock lines and read the corresponding documentation