Scripting/Squirrel/Client Functions/Script::GetTicks: Difference between revisions
Jump to navigation
Jump to search
This wiki is using an old backup from 2020
Some information may be old/missing
(Created page with "This function returns a number of milliseconds since the computer started. Can be used to measure time intervals. == Syntax == <pre>None.</pre> == Arguments == * None. ==...") |
No edit summary |
||
Line 3: | Line 3: | ||
== Syntax == | == Syntax == | ||
<pre> | <pre>int Script::GetTicks()</pre> | ||
== Arguments == | == Arguments == | ||
* None | * None | ||
== Return type == | == Return type == | ||
'''Integer''' | '''Integer''' | ||
== Example == | == Example == | ||
This will message the number of milliseconds since the computer has started. | This will message the number of milliseconds since the computer has started. | ||
< | <source lang="squirrel"> | ||
function Script::ScriptLoad( ) | function Script::ScriptLoad() | ||
{ | { | ||
Console.Print(GetTicks().tostring()); | |||
} | } | ||
</ | </source> | ||
=== Notes === | === Notes === | ||
The event [ | The event [[Scripting/Squirrel/Client_Functions/Script::GetTicks|Script::GetTicks]] was used in in this example. More info about them in the corresponding pages. |
Latest revision as of 04:02, 23 July 2016
This function returns a number of milliseconds since the computer started. Can be used to measure time intervals.
Syntax
int Script::GetTicks()
Arguments
- None
Return type
Integer
Example
This will message the number of milliseconds since the computer has started.
function Script::ScriptLoad()
{
Console.Print(GetTicks().tostring());
}
Notes
The event Script::GetTicks was used in in this example. More info about them in the corresponding pages.