-
Notifications
You must be signed in to change notification settings - Fork 2
Datetime using the Real Time Clock #3
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
Conversation
user/datetime.c
Outdated
| // Number of seconds in a year: 31556926 | ||
| // Number of seconds in a month: 2629743 | ||
| // Number of seconds in a day: 86400 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To make this a little more explicit, it would be better to define them as constants rather than magic numbers. I will be updating that for you :)
chrisdedman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
| } | ||
|
|
||
| // Function to getline from user input | ||
| void getlines(char *restrict buffer, size_t length) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like this getlines function could be simplified by adding modularity. This would help with improving readability. This is okay for now, but I will probably refactor it in the future.
Features
dandtoptions for testingMisc Changes
Format_Statestruct definition toinclude/printf.h