os/clock

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
m (Also removed the example)
m (Rephrased)
 
(One intermediate revision by one user not shown)
Line 1: Line 1:
 
{{Func
 
{{Func
 
|Description=Returns the approximate cpu time the application ran.
 
|Description=Returns the approximate cpu time the application ran.
 +
{{Note|This function has different precision on Linux (1/100).}}
 
|Realm=Shared and Menu
 
|Realm=Shared and Menu
 
|IsClass=No
 
|IsClass=No

Latest revision as of 00:58, 9 June 2019

 os.clock( )

Contents

Description

Returns the approximate cpu time the application ran.

NOTE

This function has different precision on Linux (1/100).

Returns

number

runtime

Examples

Example

Prints the amount of time since Garry's Mod has been open to the console.

print(os.clock())

Output:

runtime
Personal tools
Navigation