BIS fnc fps: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision)
(Page filling)
Line 1: Line 1:
{{Function|= Comments
{{Function|= Comments
____________________________________________________________________________________________
____________________________________________________________________________________________
Line 6: Line 5:


|1.00|= Game version
|1.00|= Game version
|eff= local|= Effect in MP
____________________________________________________________________________________________
____________________________________________________________________________________________


| <pre>
| 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
/*
____________________________________________________________________________________________
File: fpsMeasurement.sqf
 
Description:
Function to measure fps. Spawns code running for given time.
 
Parameter(s):
_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:
_handle to spawned script (-> can be used to waitUntil {scriptDone _handle};)


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


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


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


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


| |= Return value
| [[Script_(Handle)|Script handle]] |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________


|x1= <code></code> |=  
|x1= <code>_scriptHandle = [10, "50 units on screen", 3] [[call]] [[BIS_fnc_fps]];</code> |= Example 1
____________________________________________________________________________________________
____________________________________________________________________________________________


| |= See also
| [[diag_fps]], [[diag_fpsmin]], [[diag_frameno]], [[diag_tickTime]] |= See also
 
}}
}}



Revision as of 14:34, 17 May 2018

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:
Uncategorised

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:
_scriptHandle = [10, "50 units on screen", 3] call BIS_fnc_fps;

Additional Information

See also:
diag_fpsdiag_fpsmindiag_framenodiag_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

Notes

Bottom Section