arkhipenko / TaskScheduler

Cooperative multitasking for Arduino, ESPx, STM32, nRF and other microcontrollers
http://playground.arduino.cc/Code/TaskScheduler
BSD 3-Clause "New" or "Revised" License
1.26k stars 230 forks source link

how long from enable. #50

Closed tarzan115 closed 6 years ago

tarzan115 commented 6 years ago

Hi @arkhipenko, I think the library should have a method to calculate time in the millisecond, minutes... from enable a Task.

arkhipenko commented 6 years ago

Good idea. Let me think about it.


From: Doanh Văn Lương notifications@github.com Sent: Thursday, March 1, 2018 1:39 AM To: arkhipenko/TaskScheduler Cc: Anatoli Arkhipenko; Mention Subject: [arkhipenko/TaskScheduler] how long from enable. (#50)

Hi @arkhipenkohttps://github.com/arkhipenko, I think the library should have a method to calculate time in the millisecond, minutes... from enable a Task.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://github.com/arkhipenko/TaskScheduler/issues/50, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AATGTWFiGXTq2N0vGg2ys2xdeo3VmsF7ks5tZ5e-gaJpZM4SX1Hu.

arkhipenko commented 6 years ago

Upon thinking more about it I think this is a very specific case that could be covered by storing task-related information using Local Task Storage (#define _TASK_LTS_POINTER compilation directive). The reason is: it is additional 4 bytes per Task that will be there permanently there while this use case seems to be a one-off (never been requested before).