Anki-Android
Anki-Android copied to clipboard
NF: simplify Time and improve lint message
Lint message around system time was not update when Time was moved to Collection from TimeManager.
In my opinion, code is more readable if you just uses Time.s
and Time.ms
than TimeManager.Time.intTime
. On top of that, it becomes clear when time is
returned in seconds.
This way, most developer can just write code without needing to have any knowledge about time management, unless they have a test that requires to manipulate it explicitly.
As a next step, we may try to figure out whether methods that require Time
really need them. Most seems to directly gets TimeManager.time
in all
call. But this seems less important than lint (this one is mandatory) and
simplifying our abstraction for new contributors.
This one was strange. Backticks in Description made the test failed. For some reason, Kotlin would just not print two backticks. However if the string has a single backtick, it works. No idea why. Not important for this case either
Conflicts need to be resolved.
Done
Nothing more from me, just the question lukstbit asked. I think it is probably typo like the previous one ?
What kind of typealias do you want? milisecond and Second?
EpochS
and EpochMs
seems sensible
Hello 👋, this PR has been opened for more than 2 months with no activity on it. If you think this is a mistake please comment and ping a maintainer to get this merged ASAP! Thanks for contributing! You have 7 days until this gets closed automatically