Garry's Mod Wiki

os

The os library is a standard Lua library originally intended to allow Lua access to various features of the Operating System it's running on, however many of the features and functions have been removed in Garry's Mod due to security issues. It's only used in Garry's Mod for date & time operations.

Methods

number os.clock()
Returns the approximate cpu time the application ran. See also SysTime This function has different precision on Linux (1/100).
string os.date( string format, number time = os.time() )
Returns the date/time as a formatted string or in a table.
number os.difftime( number timeA, number timeB )
Subtracts the second from the first value and rounds the result.
number os.time( table dateData = nil )
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.

Page Links


Special Pages


Wikis

?

Render Time: 35ms

DB GetPage 3
Generate Html 2
SaveChanges (1) 10
Render Body 0
Render Sidebar 17