You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: Language/Functions/Time/millis.adoc
+5-10Lines changed: 5 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -4,20 +4,15 @@ categories: [ "Functions" ]
4
4
subCategories: [ "Time" ]
5
5
---
6
6
7
-
8
-
9
-
10
-
11
7
= millis()
12
8
13
-
14
9
// OVERVIEW SECTION STARTS
15
10
[#overview]
16
11
--
17
12
18
13
[float]
19
14
=== Description
20
-
Returns the number of milliseconds since the Arduino board began running the current program. This number will overflow (go back to zero), after approximately 50 days.
15
+
Returns the number of milliseconds passed since the Arduino board began running the current program. This number will overflow (go back to zero), after approximately 50 days.
21
16
[%hardbreaks]
22
17
23
18
@@ -28,11 +23,11 @@ Returns the number of milliseconds since the Arduino board began running the cur
28
23
29
24
[float]
30
25
=== Parameters
31
-
Nothing
26
+
None
32
27
33
28
[float]
34
29
=== Returns
35
-
Number of milliseconds since the program started (unsigned long)
30
+
Number of milliseconds passed since the program started (unsigned long)
36
31
37
32
--
38
33
// OVERVIEW SECTION ENDS
@@ -47,7 +42,7 @@ Number of milliseconds since the program started (unsigned long)
47
42
[float]
48
43
=== Example Code
49
44
// Describe what the example code is all about and add relevant code ►►►►► THIS SECTION IS MANDATORY ◄◄◄◄◄
50
-
The code reads the milllisecond since the Arduino board began.
45
+
This example code prints on the serial port the number of milliseconds passed since the Arduino board started running the code itself.
51
46
52
47
[source,arduino]
53
48
----
@@ -68,7 +63,7 @@ void loop() {
68
63
69
64
[float]
70
65
=== Notes and Warnings
71
-
Please note that the return value for millis() is an unsigned long, logic errors may occur if a programmer tries to do arithmetic with smaller data types such as int's. Even signed long may encounter errors as its maximum value is half that of its unsigned counterpart.
66
+
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.
0 commit comments