diff --git a/LibCarla/source/carla/profiler/Profiler.h b/LibCarla/source/carla/profiler/Profiler.h index 4ea77faff..d6f80c098 100644 --- a/LibCarla/source/carla/profiler/Profiler.h +++ b/LibCarla/source/carla/profiler/Profiler.h @@ -57,7 +57,7 @@ namespace detail { } static inline float fps(float milliseconds) { - return 1e3f / milliseconds; + return milliseconds > 0.0f ? (1e3f / milliseconds) : std::numeric_limits::max(); } const std::string _name;