G.RealFrameTime
From GMod Wiki
| Function | |
| Syntax |
RealFrameTime( ) Where is this used? |
| Description: | |
| Returns the time it took to render the previous frame. | |
| Returns: | Float frametime |
| Part of Library: | Global Functions |
| Realm: |
|
| BBCode Link: | [b][url=http://wiki.garrysmod.com/?title=G.RealFrameTime]G.RealFrameTime [img]http://wiki.garrysmod.com/favicon.ico[/img][/url][/b] |
Examples
| Description | This will print the clients FPS. |
|---|---|
| Used on | |
| Code | print( 1 / RealFrameTime() ); |
| Output | 113.77777777778 |
Additional Notes
- The difference between this and FrameTime is that it returns a frame time independent of host_timescale.
- This should only be used for things like GUI effects, not real in-game stuff.