Skip to content

Commit 723f0d4

Browse files
authored
Small fixes in millis()
Fixes on the millis page sections and example code description.
1 parent 8e10f4e commit 723f0d4

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

Language/Functions/Time/millis.adoc

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,15 @@ categories: [ "Functions" ]
44
subCategories: [ "Time" ]
55
---
66

7-
8-
9-
10-
117
= millis()
128

13-
149
// OVERVIEW SECTION STARTS
1510
[#overview]
1611
--
1712

1813
[float]
1914
=== 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.
2116
[%hardbreaks]
2217

2318

@@ -28,11 +23,11 @@ Returns the number of milliseconds since the Arduino board began running the cur
2823

2924
[float]
3025
=== Parameters
31-
Nothing
26+
None
3227

3328
[float]
3429
=== Returns
35-
Number of milliseconds since the program started (unsigned long)
30+
Number of milliseconds passed since the program started (unsigned long)
3631

3732
--
3833
// OVERVIEW SECTION ENDS
@@ -47,7 +42,7 @@ Number of milliseconds since the program started (unsigned long)
4742
[float]
4843
=== Example Code
4944
// 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.
5146

5247
[source,arduino]
5348
----
@@ -68,7 +63,7 @@ void loop() {
6863

6964
[float]
7065
=== 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.
7267

7368
--
7469
// HOW TO USE SECTION ENDS

0 commit comments

Comments
 (0)