Skip to content

Commit ac63187

Browse files
committed
Fix: Use round instead of int for duration updates
Create and other places already use round(), so this makes it more consistent. Signed-off-by: Mathias L. Baumann <[email protected]>
1 parent 0510cf3 commit ac63187

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/frequenz/client/dispatch/_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@ async def update(
325325
case "start_time":
326326
msg.update.start_time.CopyFrom(to_timestamp(val))
327327
case "duration":
328-
msg.update.duration = int(val.total_seconds())
328+
msg.update.duration = round(val.total_seconds())
329329
case "selector":
330330
msg.update.selector.CopyFrom(component_selector_to_protobuf(val))
331331
case "is_active":

0 commit comments

Comments
 (0)