G.RealTime
From GMod Wiki
| Function | |
| Syntax |
RealTime( ) Where is this used? |
| Description: | |
| If used on the server, gets the current time in seconds since server start. | |
| Returns: | Float |
| Part of Library: | Global Functions |
| Realm: |
|
| BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=G.RealTime]G.RealTime [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Example
| Description | Outputs current time to console. |
|---|---|
| Used on | |
| Code | Msg("Current time: " .. RealTime() .. "\n") |
| Output | N/A |
Additional Info
- If used on the server, it will return the time since the server started, not the time since the map was changed.
- If used on the client, it returns the time since they started Garry's Mod. Is not affected by the server.
- Not affected by host_timescale.