diff options
| author | Rémi Verschelde | 2017-10-23 20:06:23 +0200 |
|---|---|---|
| committer | GitHub | 2017-10-23 20:06:23 +0200 |
| commit | 7c188818089209b46bc6ff0cf664cbca42afb32c (patch) | |
| tree | 8f2fc8ca929cf9e96a1cf5f8fda15f6f522dc414 /main/performance.cpp | |
| parent | 62f7f629991c1dadf1cb46c984fb5e9231e9b019 (diff) | |
| parent | a97c8504fb3895be3327fa161da68b248172abce (diff) | |
| download | godot-7c188818089209b46bc6ff0cf664cbca42afb32c.tar.gz godot-7c188818089209b46bc6ff0cf664cbca42afb32c.tar.zst godot-7c188818089209b46bc6ff0cf664cbca42afb32c.zip | |
Diffstat (limited to 'main/performance.cpp')
| -rw-r--r-- | main/performance.cpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/main/performance.cpp b/main/performance.cpp index c4b62559c..39b42e803 100644 --- a/main/performance.cpp +++ b/main/performance.cpp @@ -153,6 +153,44 @@ float Performance::get_monitor(Monitor p_monitor) const { return 0; } +Performance::MonitorType Performance::get_monitor_type(Monitor p_monitor) const { + ERR_FAIL_INDEX_V(p_monitor, MONITOR_MAX, MONITOR_TYPE_QUANTITY); + // ugly + static const MonitorType types[MONITOR_MAX] = { + + MONITOR_TYPE_QUANTITY, + MONITOR_TYPE_TIME, + MONITOR_TYPE_TIME, + MONITOR_TYPE_MEMORY, + MONITOR_TYPE_MEMORY, + MONITOR_TYPE_MEMORY, + MONITOR_TYPE_MEMORY, + MONITOR_TYPE_MEMORY, + MONITOR_TYPE_QUANTITY, + MONITOR_TYPE_QUANTITY, + MONITOR_TYPE_QUANTITY, + MONITOR_TYPE_QUANTITY, + MONITOR_TYPE_QUANTITY, + MONITOR_TYPE_QUANTITY, + MONITOR_TYPE_QUANTITY, + MONITOR_TYPE_QUANTITY, + MONITOR_TYPE_QUANTITY, + MONITOR_TYPE_MEMORY, + MONITOR_TYPE_MEMORY, + MONITOR_TYPE_MEMORY, + MONITOR_TYPE_MEMORY, + MONITOR_TYPE_QUANTITY, + MONITOR_TYPE_QUANTITY, + MONITOR_TYPE_QUANTITY, + MONITOR_TYPE_QUANTITY, + MONITOR_TYPE_QUANTITY, + MONITOR_TYPE_QUANTITY, + + }; + + return types[p_monitor]; +} + void Performance::set_process_time(float p_pt) { _process_time = p_pt; |
