Skip to content

Commit c4b0610

Browse files
Update function_node.py
int->round
1 parent 709ef4b commit c4b0610

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/strands/multiagent/function_node.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ async def invoke_async(
7373
# Execute the wrapped function with proper parameters
7474
function_result = self.func(task, invocation_state, **kwargs)
7575
# Calculate execution time
76-
execution_time = int((time.time() - start_time) * 1000) # Convert to milliseconds
76+
execution_time = round((time.time() - start_time) * 1000) # Convert to milliseconds
7777
logger.debug(
7878
"function_result=<%s>, execution_time=<%dms> | function executed successfully",
7979
function_result,
@@ -115,7 +115,7 @@ async def invoke_async(
115115

116116
except Exception as e:
117117
# Calculate execution time even for failed executions
118-
execution_time = int((time.time() - start_time) * 1000) # Convert to milliseconds
118+
execution_time = round((time.time() - start_time) * 1000) # Convert to milliseconds
119119

120120
logger.error("function_name=<%s>, error=<%s> | function node failed", self.name, e)
121121

0 commit comments

Comments
 (0)