diag tickTime: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(formatting)
(formatting)
Line 1: Line 1:
{{RV|type=command
{{RV|type=command


|game1= arma2
| arma2


|version1= 1.00
|1.00
 
|game2= arma2oa
 
|version2= 1.51
 
|game3= tkoh
 
|version3= 1.00
 
|game4= arma3
 
|version4= 0.50


|gr1= Diagnostic
|gr1= Diagnostic
|gr2= Time
|gr2= Time


|descr= Real time in seconds spent from the start of the game. On Windows the command uses [https://docs.microsoft.com/en-us/windows/win32/api/timeapi/nf-timeapi-timegettime timeGetTime].
| Real time in seconds spent from the start of the game. On Windows the command uses [https://docs.microsoft.com/en-us/windows/win32/api/timeapi/nf-timeapi-timegettime timeGetTime].


|s1= '''diag_tickTime'''
| '''diag_tickTime'''


|r1= [[Number]] - Time in seconds from game start
| [[Number]]


|x1= <code>{{cc|Measure execution time of a script}}
|x1= <code>_start = [[diag_tickTime]];
_start = [[diag_tickTime]];
//code
{{cc|code}}
_stop = [[diag_tickTime]];
_stop = [[diag_tickTime]];
[[diag_log]] [[format]] ["%1",_stop - _start];</code>
[[diag_log]] [[format]] ["%1",_stop - _start];</code>
Line 37: Line 23:


<dl class='command_description'>
<dl class='command_description'>
<!-- Note Section BEGIN -->
<dd class="notedate">Posted on 8 Sept, 2010</dd>
<dt class="note">[[User:Crowe|Crowe]]<dd class="note">
In Arma 2 Operation Arrowhead 1.54.0.72888 this returns the time in seconds since the game was started.
<dd class="notedate">Posted on 25 Jan, 2014</dd>
<dd class="notedate">Posted on 25 Jan, 2014</dd>
<dt class="note">[[User:Killzone_Kid|Killzone_Kid]]<dd class="note">
<dt class="note">[[User:Killzone_Kid|Killzone_Kid]]<dd class="note">
This command will return time since last client restart as float. However because of [[Number]] format used in Arma, the more time has past since restart the less precise the returned value will be.
This command will return time since last client restart as float. However because of [[Number]] format used in Arma, the more time has past since restart the less precise the returned value will be.
<!-- Note Section END -->
</dl>
</dl>
{{GameCategory|arma2|Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}
{{GameCategory|tkoh|Scripting Commands}}
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

Revision as of 13:39, 26 March 2021

Hover & click on the images for description

Description

Description:
Description needed
Groups:
DiagnosticTime

Syntax

Syntax:
Syntax needed
Return Value:
Return value needed

Examples

Example 1:
_start = diag_tickTime; //code _stop = diag_tickTime; diag_log format ["%1",_stop - _start];

Additional Information

See also:
diag_fpsdiag_fpsMindiag_frameNodiag_logdiag_deltaTimetimesystemTimesystemTimeUTC

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
Posted on 8 Sept, 2010
Crowe
In Arma 2 Operation Arrowhead 1.54.0.72888 this returns the time in seconds since the game was started.
Posted on 25 Jan, 2014
Killzone_Kid
This command will return time since last client restart as float. However because of Number format used in Arma, the more time has past since restart the less precise the returned value will be.