Skip to content

Vlod-github/Time-system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Time system

A system that allows you to subscribe to time events.

Reasons for use

  • Reduce dependence on external APIs (Supposed to integrate with an external timer)
  • Emulation and testing
Time.subscribe(myFunc) -- subscribe to a time event
Time.unsubscribe(myFunc) -- unsubscribe from a time event
-- Next for console
Time.start()
Time.stop()
Time.resume()

Example

local Time = TimeSystem()
local myFunc = function(time)
	print(time)
end
Time.subscribe(myFunc)
Time.start()
[[ output
0.03125  
0.0625   
0.09375  
0.125    
0.15625  
0.1875   
0.21875  
...
]]

About

A system that allows you to subscribe to time events

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages