PaulStoffregen / Time

Time library for Arduino
http://playground.arduino.cc/code/time
1.24k stars 665 forks source link

Provide access to left-over milliseconds #93

Open jamesmyatt opened 6 years ago

jamesmyatt commented 6 years ago

These are some minimal changes to provide access to the left-over millis from a call to now(). I know there's been lots of discussion about this, but I need it for my clock animations and I've included suitable warnings in the Readme. Furthermore, you have to enable access to the functions via a #define in your sketch, which I think is a pretty good compromise.

I think this is better than the solutions in #11 and #45, since it will be consistent with the seconds output.

Datatype for the sysTimeMillis was selected to match prevMillis, which is uint32_t, rather than millis(), which is unsigned long.

ramarro123 commented 5 years ago

any plan to merge it?

jhdrn commented 5 years ago

This is something I'm looking for too, so please merge this! :)

cyberman54 commented 5 years ago

This would also meet my requirements.

lkaupp commented 4 years ago

Thank you very much for this patch, merged manually, works like a charm!

cyberman54 commented 3 years ago

any chance to get this PR into the main release?

cyberman54 commented 3 years ago

any news / plans here?

jamesmyatt commented 3 years ago

@cyberman54 , I think it's unlikely that this will get merged

jamesmyatt commented 1 year ago

For anyone watching, it turns out the functions in the ESP8266 and ESP32 frameworks have functionality like this, e.g. gettimeofday.

karelv commented 7 months ago

👍 I want it!