Skip to content

Commit 230fb05

Browse files
committed
update GitHub actions
1 parent 9ae7607 commit 230fb05

File tree

15 files changed

+78
-29
lines changed

15 files changed

+78
-29
lines changed

.github/workflows/arduino-lint.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ jobs:
66
runs-on: ubuntu-latest
77
timeout-minutes: 5
88
steps:
9-
- uses: actions/checkout@v4
10-
- uses: arduino/arduino-lint-action@v1
9+
- uses: actions/checkout@v5
10+
- uses: arduino/arduino-lint-action@v2
1111
with:
1212
library-manager: update
1313
compliance: strict

.github/workflows/arduino_test_runner.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
timeout-minutes: 20
99

1010
steps:
11-
- uses: actions/checkout@v4
11+
- uses: actions/checkout@v5
1212
- uses: ruby/setup-ruby@v1
1313
with:
1414
ruby-version: 2.6

.github/workflows/jsoncheck.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,15 @@ on:
55
paths:
66
- '**.json'
77
pull_request:
8+
paths:
9+
- '**.json'
810

911
jobs:
1012
test:
1113
runs-on: ubuntu-latest
1214
timeout-minutes: 5
1315
steps:
14-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v5
1517
- name: json-syntax-check
1618
uses: limitusus/json-syntax-check@v2
1719
with:

CHANGELOG.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
66
and this project adheres to [Semantic Versioning](http://semver.org/).
77

88

9+
## [0.2.6] - 2025-09-15
10+
- update GitHub actions
11+
- minor edits
12+
913
## [0.2.6] - 2023-11-22
1014
- update readme.md
1115

12-
1316
## [0.2.5] - 2023-02-10
1417
- update readme.md
1518
- implement **toSeconds()** -> 45.123 or 45.123456
@@ -19,7 +22,6 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1922
- update GitHub actions
2023
- update license 2023
2124

22-
2325
## [0.2.4] - 2022-11-26
2426
- Add RP2040 support to build-CI.
2527
- Add CHANGELOG.md

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2011-2024 Rob Tillaart
3+
Copyright (c) 2011-2025 Rob Tillaart
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,14 @@ overflow and accuracy. Depending on e.g. interrupts, millis() and micros() can d
3535
| microSeconds | 00 days 01:11:34.967296 | based upon micros() |
3636

3737

38-
#### Tests
38+
### Related
39+
40+
- https://github.com/RobTillaart/dateTimeHelpers
41+
- https://github.com/RobTillaart/printHelpers
42+
- https://github.com/RobTillaart/stopWatch_RT
43+
44+
45+
### Tests
3946

4047
Code is tested on UNO and ESP32, should work on all platforms.
4148

@@ -55,11 +62,16 @@ which could be another Arduino.
5562
#include "timing.h"
5663
```
5764

58-
The interface of all three are very similar:
65+
The interface of all three classes are very similar.
66+
67+
### Constructors
5968

6069
- **microSeconds()** constructor, sets the offset so it starts at 0.
6170
- **milliSeconds()** constructor, sets the offset so it starts at 0.
6271
- **seconds()** constructor, sets the offset so it starts at 0.
72+
73+
### Functions
74+
6375
- **uint32_t now()** returns the time elapsed since its 'zero moment'.
6476
Ether set during construction or by a call to **set(0)**.
6577
- **void set(uint32_t value = 0UL)** sets the offset of the object.
@@ -72,9 +84,14 @@ So seconds for seconds, millis for millis and micros for micros.
7284
- **double toSeconds()** returns a float representation of the current value in seconds.
7385
e.g. 15678 milliseconds becomes 15.678 seconds (SI units).
7486

75-
#### Experimental
7687

77-
- ** char \* toClock()** converts current seconds to a clock like char array "HH:MM:SS".
88+
### Experimental
89+
90+
Not implemented yet
91+
92+
See also dateTimeHelpers library.
93+
94+
- **char \* toClock()** converts current seconds to a clock like char array "HH:MM:SS".
7895
Only for the seconds class for now.
7996

8097

examples/microSeconds/microSeconds.ino

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,26 @@
1212
void setup()
1313
{
1414
Serial.begin(115200);
15+
Serial.println();
1516
Serial.println(__FILE__);
17+
Serial.print("TIMING_LIB_VERSION: ");
18+
Serial.println(TIMING_LIB_VERSION);
19+
Serial.println();
1620
delay(10);
1721

18-
microSeconds ms; // starts at zero
19-
uint64_t big = fibonaci(91); // 91 is the max!
22+
uint32_t z = micros();
23+
microSeconds ms; // starts at zero
24+
uint64_t big = fibonaci(91); // 91 is the max!
2025
uint32_t x = micros();
2126
uint32_t y = ms.now();
27+
// do it the long way
2228
Serial.print("micros():\t");
23-
Serial.println(x);
29+
Serial.print(x);
30+
Serial.print(" - ");
31+
Serial.print(z);
32+
Serial.print(" = ");
33+
Serial.println(x - z);
34+
// do it the easy way
2435
Serial.print("ms.now(): \t");
2536
Serial.println(y);
2637
Serial.print(" fib(91): \t");
@@ -55,5 +66,4 @@ uint64_t fibonaci(uint32_t n)
5566
}
5667

5768

58-
// -- END OF FILE --
59-
69+
// -- END OF FILE --

examples/milliSeconds/milliSeconds.ino

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,14 @@
1111
void setup()
1212
{
1313
Serial.begin(115200);
14+
Serial.println();
1415
Serial.println(__FILE__);
16+
Serial.print("TIMING_LIB_VERSION: ");
17+
Serial.println(TIMING_LIB_VERSION);
18+
Serial.println();
1519
delay(10);
1620

17-
milliSeconds mis; // starts at zero
21+
milliSeconds mis; // starts at zero
1822
for (uint32_t i = 0; i < 1000; i++)
1923
{
2024
Serial.print(i);
@@ -25,7 +29,7 @@ void setup()
2529
Serial.print("milliseconds:\t");
2630
Serial.println(x);
2731

28-
mis.set(0); // starts at zero
32+
mis.set(0); // starts at zero
2933
for (uint32_t i = 0; i < 1000; i++)
3034
{
3135
Serial.print(i);
@@ -45,5 +49,5 @@ void loop()
4549
}
4650

4751

48-
// -- END OF FILE --
52+
// -- END OF FILE --
4953

examples/seconds/seconds.ino

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,17 @@ uint32_t x = 1;
2525
void setup()
2626
{
2727
Serial.begin(115200);
28+
Serial.println();
2829
Serial.println(__FILE__);
30+
Serial.print("TIMING_LIB_VERSION: ");
31+
Serial.println(TIMING_LIB_VERSION);
32+
Serial.println();
33+
delay(10);
2934
Serial.println("UNO (16Mhz) takes ~ 30 seconds...");
3035
Serial.println("ESP32 (240MHz) takes ~ 10 seconds...");
3136

3237
delay(10);
33-
seconds sec; // starts at zero
38+
seconds sec; // starts at zero
3439
while (x < mx)
3540
{
3641
nextPrime();
@@ -40,7 +45,7 @@ void setup()
4045

4146
delay(10);
4247
x = 1;
43-
sec.set(); // starts at zero
48+
sec.set(); // starts at zero
4449
while (x < mx)
4550
{
4651
nextPrime();
@@ -57,7 +62,7 @@ void loop()
5762
}
5863

5964

60-
// sort of sieve.
65+
// sort of sieve.
6166
int nextPrime()
6267
{
6368
bool prime = true;
@@ -74,11 +79,14 @@ int nextPrime()
7479
}
7580
}
7681
} while (!prime);
77-
if (idx < MAXPRIMES) primes[idx++] = x;
82+
if (idx < MAXPRIMES)
83+
{
84+
primes[idx++] = x;
85+
}
7886

7987
return x;
8088
}
8189

8290

83-
// -- END OF FILE --
91+
// -- END OF FILE --
8492

examples/seconds_toClock/seconds_toClock.ino

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ seconds sec;
1414
void setup()
1515
{
1616
Serial.begin(115200);
17+
Serial.println();
1718
Serial.println(__FILE__);
19+
Serial.print("TIMING_LIB_VERSION: ");
20+
Serial.println(TIMING_LIB_VERSION);
21+
Serial.println();
22+
delay(10);
1823

1924
sec.set(3545);
2025
}

0 commit comments

Comments
 (0)