BIS fnc fps: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (template:command argument fix)
m (Text replacement - "Script handle" to "Script Handle")
 
(23 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Function|= Comments
{{RV|type=function
____________________________________________________________________________________________


| arma2 |= Game name
|game1= arma2
|version1= 1.00


|1.00|= Game version
|game2= arma2oa
|version2= 1.50


|eff= local|= Effect in MP
|game3= tkoh
____________________________________________________________________________________________
|version3= 1.00


| Function to measure FPS. Spawns code running for given time and displays result on screen ''via'' [[titleText]], [[globalChat]] '''and''' [[diag_log]]. Variable '''BIS_fps_output''' is filled with diag_log content too. |DESCRIPTION=
|game4= arma3
____________________________________________________________________________________________
|version4= 0.50


| [duration, sceneId, startDelay] call [[BIS_fnc_fps]] |SYNTAX=
|gr1= Diagnostic


|p1= duration: [[Number]] - the FPS test duration |PARAMETER1=
|eff= local


|p2= sceneId: [[String]] - (Optional, default "") scene ID, used in outputs. Fills global variable '''currentScene''' |PARAMETER2=
|descr= Function to measure FPS. Spawns code running for given time and displays result on screen ''via'' [[titleText]], [[globalChat]] '''and''' [[diag_log]].
Variable '''BIS_fps_output''' is filled with [[diag_log]] content too.


|p3= startDelay: [[Number]] - (Optional, default 0) delay before starting measurement |PARAMETER3=
|s1= [duration, sceneId, startDelay] call [[BIS_fnc_fps]]


| [[Script_(Handle)|Script handle]] |RETURNVALUE=
|p1= duration: [[Number]] - the FPS test duration
____________________________________________________________________________________________


|x1= <code>_scriptHandle = [10, "50 units on screen", 3] [[call]] [[BIS_fnc_fps]];</code> |EXAMPLE1=
|p2= sceneId: [[String]] - (Optional, default "") scene ID, used in outputs. Fills global variable '''currentScene'''
____________________________________________________________________________________________


| [[diag_fps]], [[diag_fpsMin]], [[diag_frameNo]], [[diag_tickTime]] |SEEALSO=
|p3= startDelay: [[Number]] - (Optional, default 0) delay before starting measurement
}}


<h3 style="display:none">Notes</h3>
|r1= [[Script Handle]]
<dl class="command_description">
<!-- Note Section BEGIN -->


<!-- Note Section END -->
|x1= <sqf>private _scriptHandle = [10, "50 units on screen", 3] call BIS_fnc_fps;</sqf>
</dl>


<h3 style="display:none">Bottom Section</h3>
|seealso= [[diag_fps]] [[diag_fpsMin]] [[diag_frameNo]] [[diag_tickTime]]
[[Category:Function Group: Diagnostic|{{uc:fps}}]]
}}
[[Category:Functions|{{uc:fps}}]]
[[Category:{{Name|arma2}}: Functions|{{uc:fps}}]]
[[Category:{{Name|arma2oa}}: Functions|{{uc:fps}}]]
[[Category:{{Name|tkoh}}: Functions|{{uc:fps}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:fps}}]]

Latest revision as of 19:17, 9 August 2022

Hover & click on the images for description

Description

Description:
Function to measure FPS. Spawns code running for given time and displays result on screen via titleText, globalChat and diag_log. Variable BIS_fps_output is filled with diag_log content too.
Execution:
call
Groups:
Diagnostic

Syntax

Syntax:
[duration, sceneId, startDelay] call BIS_fnc_fps
Parameters:
duration: Number - the FPS test duration
sceneId: String - (Optional, default "") scene ID, used in outputs. Fills global variable currentScene
startDelay: Number - (Optional, default 0) delay before starting measurement
Return Value:
Script Handle

Examples

Example 1:
private _scriptHandle = [10, "50 units on screen", 3] call BIS_fnc_fps;

Additional Information

See also:
diag_fps diag_fpsMin diag_frameNo diag_tickTime

Notes

Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note