Skip to content

Commit

Permalink
add changelog.md (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
RobTillaart committed Nov 26, 2022
1 parent 075596c commit 9210ed4
Show file tree
Hide file tree
Showing 6 changed files with 80 additions and 28 deletions.
24 changes: 20 additions & 4 deletions .arduino-ci.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,30 @@
platforms:
rpipico:
board: rp2040:rp2040:rpipico
package: rp2040:rp2040
gcc:
features:
defines:
- ARDUINO_ARCH_RP2040
warnings:
flags:

packages:
rp2040:rp2040:
url: https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json

compile:
# Choosing to run compilation tests on 2 different Arduino platforms
platforms:
- uno
- due
- zero
- leonardo
# - due
# - zero
# - leonardo
- m4
- esp32
- esp8266
- mega2560
# - mega2560
- rpipico
libraries:
- "printHelpers"

38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Change Log timing

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).


## [0.2.4] - 2022-11-26
- Add RP2040 support to build-CI.
- Add CHANGELOG.md
- update readme.md


## [0.2.3] - 2021-12-29
- update library.json
- update license
- minor edits

## [0.2.2] - 2021-05-27
- added Arduino-lint

## [0.2.1] - 2021-01-09
- added Arduino-CI + unit test

## [0.2.0] - 2020-07-07
- renamed to timing.h

----

## [0.1.02] - 2015-03-02
- move all to mymillis.h file so compiler can optimize

## [0.1.01] - 2011-07-19
- add lib version

## [0.1.00] - 2011-01-04
- initial version
25 changes: 16 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ Therefore they have the same restrictions as these functions with respect to
overflow and accuracy. Depending on e.g. interrupts millis and micros can drift.


| class | overflow after | Notes |
|:-------------|:-------------------------|:--------------------|
| seconds | 49 days, 17:02:47 | based upon millis() |
| milliSeconds | 49 days, 17:02:47.297 |
| microSeconds | 00 days 01:11:34.967296 |
| class | overflow after | Notes |
|:---------------|:---------------------------|:----------------------|
| seconds | 49 days, 17:02:47 | based upon millis() |
| milliSeconds | 49 days, 17:02:47.297 |
| microSeconds | 00 days 01:11:34.967296 |


## Applications
Expand Down Expand Up @@ -59,19 +59,26 @@ See examples.

## Future

#### must
- test on ESP32
- nanos() on ESP32 ?
- implement printable interface (add unit)
- ?
- implement toClock()

#### should
- implement toClock()
- idea to give it a clock print layout
- seconds.toClock() -> DD 12:34:56
- milliSeconds.toClock(3) -> 12:23:45.123 (3) == 3 decimals..
- milliSeconds.toClock(1) -> 12:23:45.1
- microSeconds.toCLock() -> 12:23:45.123456 ???
- printHelpers class?
- implement toSeconds()
- double milliSeconds.toSeconds() -> 45.123
- double microSeconds.toSeconds() -> 45.123456

#### could
- nanos() on ESP32 ?
- implement printable interface
- add unit (s, ms, us)
- what layout to use?
- update documentation
- rounding effect, describe

2 changes: 1 addition & 1 deletion library.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"type": "git",
"url": "https://github.com/RobTillaart/timing"
},
"version": "0.2.3",
"version": "0.2.4",
"license": "MIT",
"frameworks": "arduino",
"platforms": "*",
Expand Down
2 changes: 1 addition & 1 deletion library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=timing
version=0.2.3
version=0.2.4
author=Rob Tillaart <rob.tillaart@gmail.com>
maintainer=Rob Tillaart <rob.tillaart@gmail.com>
sentence=Arduino library with wrapper classes for seconds millis micros.
Expand Down
17 changes: 4 additions & 13 deletions timing.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,12 @@
//
// FILE: timing.h
// AUTHOR: Rob Tillaart
// VERSION: 0.2.3
// VERSION: 0.2.4
// PURPOSE: Arduino library with wrapper classes for seconds millis micros
// URL: https://github.com/RobTillaart/timing
//
// HISTORY:
// 0.1.00 2011-01-04 initial version
// 0.1.01 2011-07-19 lib version
// 0.1.02 2015-03-02 move all to mymillis.h file so compiler can optimize
// 0.2.0 2020-07-07 renamed to timing.h
// 0.2.1 2021-01-09 added Arduino-CI + unit test
// 0.2.2 2021-05-27 added Arduino-lint
// 0.2.3 2021-12-29 update library.json, license, minor edits


#define TIMING_LIB_VERSION (F("0.2.3"))
#define TIMING_LIB_VERSION (F("0.2.4"))


class microSeconds
Expand Down Expand Up @@ -49,8 +40,8 @@ class seconds
{
public:
seconds() { set(0); }
uint32_t now() { return millis()/1000UL - _offset; }
void set(uint32_t value = 0UL) { _offset = millis()/1000UL - value; }
uint32_t now() { return millis() / 1000UL - _offset; }
void set(uint32_t value = 0UL) { _offset = millis() / 1000UL - value; }
uint32_t getOffset() { return _offset; };

private:
Expand Down

0 comments on commit 9210ed4

Please sign in to comment.