summaryrefslogtreecommitdiff
path: root/main/performance.cpp
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2021-07-26 19:37:49 +0200
committerGitHub <noreply@github.com>2021-07-26 19:37:49 +0200
commita504e4d4c3af53bb21a0013132719affd3e21798 (patch)
treed7555c02d6f13f3df95dadb78669c1b1c47c6c17 /main/performance.cpp
parentdb1603b805056a2b1087089829ab9bd6b2cfbd44 (diff)
parent4ecb6fba8002533f266d03e13ccba7cee4216421 (diff)
Merge pull request #38880 from aaronfranke/timer
Use doubles for time everywhere in Timer/SceneTree
Diffstat (limited to 'main/performance.cpp')
-rw-r--r--main/performance.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/main/performance.cpp b/main/performance.cpp
index 9f5be7b8c4..f9ff34c05d 100644
--- a/main/performance.cpp
+++ b/main/performance.cpp
@@ -77,7 +77,7 @@ void Performance::_bind_methods() {
BIND_ENUM_CONSTANT(MONITOR_MAX);
}
-float Performance::_get_node_count() const {
+int Performance::_get_node_count() const {
MainLoop *ml = OS::get_singleton()->get_main_loop();
SceneTree *sml = Object::cast_to<SceneTree>(ml);
if (!sml) {
@@ -118,7 +118,7 @@ String Performance::get_monitor_name(Monitor p_monitor) const {
return names[p_monitor];
}
-float Performance::get_monitor(Monitor p_monitor) const {
+double Performance::get_monitor(Monitor p_monitor) const {
switch (p_monitor) {
case TIME_FPS:
return Engine::get_singleton()->get_frames_per_second();
@@ -207,11 +207,11 @@ Performance::MonitorType Performance::get_monitor_type(Monitor p_monitor) const
return types[p_monitor];
}
-void Performance::set_process_time(float p_pt) {
+void Performance::set_process_time(double p_pt) {
_process_time = p_pt;
}
-void Performance::set_physics_process_time(float p_pt) {
+void Performance::set_physics_process_time(double p_pt) {
_physics_process_time = p_pt;
}