Skip to content

Conversation

@Daraan
Copy link
Contributor

@Daraan Daraan commented Aug 27, 2024

Description

When using self.wallclock_t0 = GameTime.get_wallclocktime(), which returns _platform_timestamp a type-checker complains that the type used afterwards is int | datetime.datetime, however it is never used as int this is just the intial value. This minimal PR unifies the type to be always a datetime object.

- _platform_timestamp = 0
+ _platform_timestamp = datetime.datetime.fromtimestamp(0)

Where has this been tested?

  • Platform(s): Ubuntu 22.04
  • Python version(s): 3.7 & 3.10
  • Unreal Engine version(s):
  • CARLA version: 0.9.15 dev

Possible Drawbacks


This change is Reviewable

@Daraan Daraan changed the title timestamp is always datetime GameTime.get_wallclocktime() should return a datetime object Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant