FECALITY.SHOP [API]
  • Overview
  • GETTING STARTED
    • Metadata
    • Creating scripts
    • Callbacks
    • Examples
    • Useful resources
  • DOCUMENTATION
    • Datatypes
      • entity
      • player_info
      • weapon_info
      • user_cmd
      • trace_t
      • vec3
      • cvar
      • timer
      • cfg_value
      • shot_info
      • game_event
      • material
      • material_var
      • zip
      • animator
    • Namespaces
      • Gui
      • Render
      • Engine
      • Math
      • Utilities
      • Entities
      • Database
      • Input
      • Panorama
      • Materials
      • Filesystem
      • Zip
    • Instances
      • Global Vars
      • Fecality
      • Gamerules
      • Server
Powered by GitBook
On this page
  1. DOCUMENTATION
  2. Datatypes

timer

utils.new_timer

Functions

start

local timer = utils.new_timer(100, function()print("This will be printed every 100ms")end)​timer:start()

Usage:

Begins the timer.

stop

timer:stop()

Usage:

Pauses the timer.

run_once

local timer = utils.new_timer(100, function()print("This will be printed once")end)​timer:run_once()

Usage:

Run a timer once.

is_active

local timer_active = timer:is_active()

Returns:

timer's state

boolean

set_delay

local timer = utils.new_timer(0, function()print("This will be run every 1000ms")end)timer:set_delay(1000)timer:start()​

delay

number

the amount of ms to change the timer's delay to

PreviouscvarNextcfg_value

Last updated 2 years ago

​​

​​

​​

​​

​​

Value
Datatype
Parameter
Datatype
Description