Skip to content

Commit

Permalink
Update Python's time() to return a float instead of an int (#2412)
Browse files Browse the repository at this point in the history
`tic_api_time` returns a `double`, not an `int`, so it should push a `float`, not an `int`.
  • Loading branch information
MineRobber9000 authored Dec 23, 2023
1 parent faf01b1 commit e1dbcd0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/api/python.c
Original file line number Diff line number Diff line change
Expand Up @@ -1018,8 +1018,8 @@ static int py_time(pkpy_vm* vm)
if(pkpy_check_error(vm))
return 0;

int time = tic_api_time(tic);
pkpy_push_int(vm, time);
double time = tic_api_time(tic);
pkpy_push_float(vm, time);
return 1;
}

Expand Down

0 comments on commit e1dbcd0

Please sign in to comment.