Skip to content
This repository has been archived by the owner on Jun 6, 2023. It is now read-only.

sbox-community/sbox-timer-lib

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 

Repository files navigation

sbox-timer-lib

Timer library like Garry's Mod for s&box

void Timer.Simple( float delay, Action func, bool threaded = false )

void Timer.Create( string id, float delay, int repetitions, Action func, bool threaded = false )

bool Timer.Exists( string id )

bool Timer.Remove( string id )

float Timer.TimeLeft( string id )

int Timer.RepsLeft( string id )

bool Timer.Adjust( string id, float? delay = null, int? repetitions = null, Action? func = null )

bool Timer.Pause( string id )

bool Timer.UnPause( string id )

bool Timer.Toggle( string id )

bool Timer.Start( string id )

bool Timer.Stop( string id )

Dictionary<string, Timer> Timer.All()

void Timer.PrintAll()

Example

Timer.Simple( 1f, () =>
{
  ...
} );
    
Timer.Create( "identity", 1f, 10, () =>
{
  ...
} );

Timer.Simple( 1f, func, threaded: true );

About

Timer library like Garry's Mod for s&box

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages