mirror of
https://github.com/aclist/dztui.git
synced 2026-10-25 12:12:31 +01:00
chore: add comments regarding time interpolation
Mirror to Codeberg / mirror-to-codeberg (push) Has been cancelled
Mirror to Codeberg / mirror-to-codeberg (push) Has been cancelled
This commit is contained in:
1 parent
cee1e3b8af
commit
c15b77d470
1 file changed
+7
@@ -284,6 +284,13 @@ class TimePicker(Gtk.Box):
|
|||||||
return int(self.minute_spin.get_adjustment().get_value())
|
return int(self.minute_spin.get_adjustment().get_value())
|
||||||
|
|
||||||
def get_time(self) -> datetime:
|
def get_time(self) -> datetime:
|
||||||
|
"""
|
||||||
|
NOTE: interpolating seconds/microseconds from the current time
|
||||||
|
may prevent abrupt visual changes when setting a new TimePicker time
|
||||||
|
while a clock tick is updating the local remainder label.
|
||||||
|
However, this can introduce false negatives when running tests due to microsecond drift.
|
||||||
|
Ideally, tests should be decoupled from this logic.
|
||||||
|
"""
|
||||||
d = datetime.now()
|
d = datetime.now()
|
||||||
return datetime.combine(
|
return datetime.combine(
|
||||||
d,
|
d,
|
||||||
|
|||||||
Reference in new issue
Block a user