Skip to content

delay() is inaccurate (regression) #81

@urish

Description

@urish

Reproduction:

void setup() {
  Serial.begin(115200);
  int start = millis();
  delay(500);
  Serial.println(millis() - start);
}

void loop() {
}

With the current AVR8js version, the above code prints 4, while on silicone (and also in previous AVR8js versions) it prints 499.

This issue started happening since 0.14.7 release, which fixed #80.

It can be easily reproduced by going to the AVR8js Serial example, pasting the code above, installing version 0.14.7 of the avr8js package, and running the simulation.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions