Skip to content

Commit af2568f

Browse files
author
dave
committed
#13 three macros to help with duration conversions.
1 parent 8513f0b commit af2568f

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

library.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"maintainer": true
1414
}
1515
],
16-
"version": "1.0.3",
16+
"version": "1.0.4",
1717
"license": "Apache-2.0",
1818
"frameworks": "arduino, mbed",
1919
"platforms": "*"

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=TaskManagerIO
2-
version=1.0.3
2+
version=1.0.4
33
maintainer=https://www.thecoderscorner.com
44
author=davetcc
55
category=Other

src/TaskManagerIO.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -314,4 +314,19 @@ class TaskManager {
314314
/** the global task manager, this would normally be associated with the main runLoop. */
315315
extern TaskManager taskManager;
316316

317+
/**
318+
* Converts a duration in milliseconds to microseconds.
319+
*/
320+
#define millisToMicros(x) ((x)*1000UL)
321+
322+
/**
323+
* Converts a duration in seconds to microseconds.
324+
*/
325+
#define secondsToMicros(x) ((x)*1000000UL)
326+
327+
/**
328+
* Converts a duration in seconds to milliseconds.
329+
*/
330+
#define secondsToMillis(x) ((x)*1000UL)
331+
317332
#endif //TASKMANAGER_IO_H

0 commit comments

Comments
 (0)