Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implements timestamp_t structure #4371

Closed
wants to merge 3 commits into from

Conversation

jbrazio
Copy link
Contributor

@jbrazio jbrazio commented Jul 22, 2016

As a followup of #4298 (comment) this PR implements a new timestamp_t structure which allows easy elapsed time manipulation. When compared with the previous code having #define PRINTCOUNTER enabled, it saves 72 bytes of binary size.

@jbrazio jbrazio added this to the 1.1.0 milestone Jul 22, 2016
@petrzjunior
Copy link
Contributor

What about doing something similar in LCD Info menu (#4312)? I did the format as
dddddd hhh mmm with two spaces before to fit exactly to 16x2.

@jbrazio
Copy link
Contributor Author

jbrazio commented Jul 22, 2016

Without changes you may use the hour() and minute() to reuse the calculations but~~~ we can do better by having another string formats, replace toString() with another name.~~

@petrzjunior
Copy link
Contributor

Something like... toStringYears() and toStringDays()?

@thinkyhead
Copy link
Member

Hmm, the compiler seems to be doing smart things, using registers a lot and so forth. The inline keyword makes no difference. I can't get the compiler to be more optimal. So… merging forthwith.

@thinkyhead
Copy link
Member

Merged!

@thinkyhead thinkyhead closed this Jul 22, 2016
@jbrazio jbrazio deleted the timestamp_t branch July 22, 2016 23:22
drewmoseley pushed a commit to drewmoseley/Marlin that referenced this pull request Feb 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants