Skip to content

Commit 4b5bb6b

Browse files
authored
Add files via upload
1 parent c70d8cd commit 4b5bb6b

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Test_rollover/Test_rollover.ino

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
// To do: Works only when the 2 library files (cpp, h) are in the project directory
2-
// Seems to work for delay values from 0 to 2^31-1
3-
// Rollover is tested
4-
51
#include <Arduino.h>
62
#include <Streaming.h>
73
#include "avdweb_VirtualDelay.h"
@@ -40,8 +36,8 @@ void loop()
4036
( delay_ms.start(ms);
4137
delay_us.start(us);
4238
)
43-
if(delay_ms.elapsed()) Serial << "\n" << millis()-t0_ms << "ms"; // result is 1021ms
44-
if(delay_us.elapsed()) Serial << "\n" << micros()-t0_us << "us"; // result is 2021884us
39+
if(delay_ms.elapsed()) Serial << "\n" << millis()-t0_ms << "ms"; // result is ~ 1021ms
40+
if(delay_us.elapsed()) Serial << "\n" << micros()-t0_us << "us"; // result is ~ 2021884us
4541
}
4642

4743

0 commit comments

Comments
 (0)