Switch to microtick

This commit is contained in:
copy 2016-02-14 13:15:09 +01:00
parent 7d250aec0d
commit ba5ac54c04
2 changed files with 5 additions and 6 deletions

View file

@ -403,9 +403,7 @@ CPU.prototype.main_run = function()
{
if(this.in_hlt)
{
var t = this.hlt_loop();
return 0;
//return t;
return this.hlt_loop();
}
else
{
@ -750,7 +748,7 @@ CPU.prototype.do_run = function()
/**
* @type {number}
*/
start = Date.now(),
start = v86.microtick(),
now = start;
// outer loop:
@ -790,7 +788,7 @@ CPU.prototype.do_run = function()
}
}
now = Date.now();
now = v86.microtick();
}
};
@ -848,7 +846,7 @@ CPU.prototype.hlt_loop = function()
{
//dbg_log("In HLT loop", LOG_CPU);
var now = Date.now();
var now = v86.microtick();
if(ENABLE_HPET)
{

View file

@ -122,6 +122,7 @@ RTC.prototype.set_state = function(state)
RTC.prototype.timer = function(time, legacy_mode)
{
time = Date.now(); // XXX
this.rtc_time += time - this.last_update;
this.last_update = time;