{"name":"diag_tickTime","operator":null,"title":"diag tickTime","type":"command","url":"https://community.bistudio.com/wiki/diag_tickTime","revid":369360,"updated":"2024-09-03T18:43:06Z","groups":["Diagnostic","Time"],"status":"ok","replaced_by":[],"games":[{"game":"arma2","name":"Arma 2","version":"1.00"},{"game":"arma2oa","name":"Arma 2: Operation Arrowhead","version":"1.50"},{"game":"tkoh","name":"Take On Helicopters","version":"1.00"},{"game":"arma3","name":"Arma 3","version":"0.50"}],"since":{"game":"arma2","name":"Arma 2","version":"1.00"},"arma3_since":"0.50","branch":null,"locality":{"argument":null,"effect":null,"server_exec":false},"exec":null,"description":"Real time in seconds spent from the start of the game. On Windows the command uses [timeGetTime](https://docs.microsoft.com/en-us/windows/win32/api/timeapi/nf-timeapi-timegettime).","syntaxes":[{"syntax":"diag_tickTime","since":null,"effect":null,"exec":null,"params":[],"returns":{"type":"Number","types":["Number"],"description":"time in seconds from game start","text":"Number - time in seconds from game start"},"form":"nullary","operator":null,"left":null,"right":null}],"examples":[{"text":"```sqf\n// Measure execution time of a script\n_start = diag_tickTime;\n// code\n_stop = diag_tickTime;\ndiag_log format [\"%1\",_stop - _start];\n```","code":["// Measure execution time of a script\n_start = diag_tickTime;\n// code\n_stop = diag_tickTime;\ndiag_log format [\"%1\",_stop - _start];"]}],"multiplayer":null,"problems":null,"aliases":[],"see_also":["diag_fps","diag_fpsMin","diag_frameNo","diag_log","diag_deltaTime","time","systemTime","systemTimeUTC"],"notes":[{"user":"DreadedEntity","date":"2022-04-13T23:20:29Z","text":"This command keeps incrementing if the player has paused the game, even in singleplayer. If time spent paused should not be considered, use time"}],"categories":["Arma 2: New Scripting Commands","Arma 2: Operation Arrowhead: Scripting Commands","Arma 2: Scripting Commands","Arma 3: Scripting Commands","Command Group: Diagnostic","Command Group: Time","Introduced with Arma 2 version 1.00","Scripting Commands","Take On Helicopters: Scripting Commands"]}