Skip to content

Commit f771089

Browse files
authored
Update millis.adoc
Use of millis() may become unreliable if timer0 is reprogrammed, so a small warning might be useful that timer0 is used by millis().
1 parent cbd3ffb commit f771089

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Language/Functions/Time/millis.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ void loop() {
6464

6565
[float]
6666
=== Notes and Warnings
67-
Please note that the return value for millis() is of type `unsigned long`, logic errors may occur if a programmer tries to do arithmetic with smaller data types such as `int`. Even signed `long` may encounter errors as its maximum value is half that of its unsigned counterpart.
67+
Please note that the return value for millis() is of type `unsigned long`, logic errors may occur if a programmer tries to do arithmetic with smaller data types such as `int`. Even signed `long` may encounter errors as its maximum value is half that of its unsigned counterpart. millis() uses timer0's overflow interrupt.
6868

6969
--
7070
// HOW TO USE SECTION ENDS

0 commit comments

Comments
 (0)