os/time

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
(geek alert! example output will always be up to date)
m (Also menu state)
 
Line 1: Line 1:
 
{{Func
 
{{Func
 
|Description=Returns the system time in seconds past the unix epoch. If a table is supplied, the function attempts to build a system time with the specified table members.
 
|Description=Returns the system time in seconds past the unix epoch. If a table is supplied, the function attempts to build a system time with the specified table members.
|Realm=Shared
+
|Realm=Shared and Menu
 
|IsClass=No
 
|IsClass=No
 
|Name=time
 
|Name=time

Latest revision as of 03:37, 24 July 2016

 os.time( )

Contents

Description

Returns the system time in seconds past the unix epoch. If a table is supplied, the function attempts to build a system time with the specified table members.

Arguments

table dateData=nil

Table to generate the time from. This table's data is interpreted as being in the local timezone. See DateData structure

Returns

number

Seconds passed since Unix epoch

Examples

Example

Prints out the current time, in seconds past the unix epoch.

print( os.time() )

Output:

1603186212
Personal tools
Navigation