BIS fnc fps: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Generated by BIS_fnc_exportFunctionsToWiki)
 
m (Text replacement - "Script handle" to "Script Handle")
 
(28 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{RV|type=function


{{Function|= Comments
|game1= arma2
____________________________________________________________________________________________
|version1= 1.00


| arma2 |= Game name
|game2= arma2oa
|version2= 1.50


|1.00|= Game version
|game3= tkoh
____________________________________________________________________________________________
|version3= 1.00


| <pre>
|game4= arma3
/*
|version4= 0.50
File: fpsMeasurement.sqf


Description:
|gr1= Diagnostic
Function to measure fps. Spawns code running for given time.


Parameter(s):
|eff= local
_this select 0: scalar - time, length of measurement
_this select 1: string - identification of measurement (will be printed to screen)
_this select 2: scalar - (optional) sleep time - time to wait before measurement starts


Returns:
|descr= Function to measure FPS. Spawns code running for given time and displays result on screen ''via'' [[titleText]], [[globalChat]] '''and''' [[diag_log]].
_handle to spawned script (-> can be used to waitUntil {scriptDone _handle};)
Variable '''BIS_fps_output''' is filled with [[diag_log]] content too.


  Warning - do not use console during fps measurement - it stops time <- fixed?
|s1= [duration, sceneId, startDelay] call [[BIS_fnc_fps]]
*/


</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
|p1= duration: [[Number]] - the FPS test duration
____________________________________________________________________________________________


| <!-- [] call [[BIS_fnc_fps]]; --> |= Syntax
|p2= sceneId: [[String]] - (Optional, default "") scene ID, used in outputs. Fills global variable '''currentScene'''


|p1= |= Parameter 1
|p3= startDelay: [[Number]] - (Optional, default 0) delay before starting measurement


| |= Return value
|r1= [[Script Handle]]
____________________________________________________________________________________________


|x1= <code></code> |=
|x1= <sqf>private _scriptHandle = [10, "50 units on screen", 3] call BIS_fnc_fps;</sqf>
____________________________________________________________________________________________
 
| |= See also


|seealso= [[diag_fps]] [[diag_fpsMin]] [[diag_frameNo]] [[diag_tickTime]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[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 18: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