— { Clock Library: The Only Timer Library you will ever need! } —
GET CLOCK LIBRARY HERE :
- Clock Library Asset
-
RBX Script File
Clock Library (1.1.75).rbxm (13.6 KB)
What is Clock Library
- Clock Library is a very powerful, effective, handy, complex but easy to understand Timer Library that will get rid of all need for any other Timer Library Module, designed and made by @Tironpc!
Why should i use Clock Library
-
Powerful and Effective Timers
-
99% Typechecked, but dont worry every useful info / type is fully implemented!
-
Useful in every scenario, being very
Versatile
andCompatible
-
Has a lot of
Features
, and more will get added over time -
Beginner Friendly, having a Documentation and Tutorial on Github
-
This Library will be useful for a long period, listening to your suggestions and managing any bugs you encounter
-
OOP Based Library !
How do i use Clock Library
How to use
To use the Library all you have to do is get the module on the ROBLOX
Creator Store:
Or do this:
Inser the RBX File into your game, preferrably in ReplicatedStorage or Server-Side:
RBX Script File
Clock Library (1.1.75).rbxm (13.6 KB)
Documentation
Patch Notes
[details=" Patch Notes"]
V → 1.1.5
V 1.1.5
The Connections Update
Hello fellow Devs, update V → 1.1.5 is here and it massively overhauls one feature of the ClockLibrary:
Connections
Connections
Previously all Connections ran together sort of like a Queue System, which worked very well but had 2 issues:
-
They sometimes clogged themselves up leading to sometimes not firing anything, which rarely happened but still should be avoided.
-
They fired simultaneously, with could (only in rare occasions) cause lag spikes in the future or for big projects.
Now they fire sequentially (Not Parallel Luau)
They also fire on a small delay that is almost impossible to notice while still making sure each connection fires!
This also improves performance of the Library by a lot, even though it is very lag-free!
Now this isn’t the only change:
Connections can send arguments to Connected Functions!
Like OnElapse
and the new OnStint
Connection!
They both send 2 arguments to Connected Functions:
deltaTime: number, Time in between each frame.
TimeLeft: number | string, Time Left until the ClockInstance’s Timer finishes.
New Connections:
New Connections
OnStint
Fires every X amount of seconds within a ClockInstance’s Timer based on the Stint
variable inside a ClockInstance.
This OnStint Connection is also the 1
(First) Connection that will fire.
(This is the replacement of the OnInterval
Connection)
OnStart
Fires when a ClockInstance starts it’s Timer (Not restarting)
OnSleep
Fires when a ClockInstance sleeps, a ClockInstance sleeps when:
-
2 Seconds after it finishes it’s Timer.
-
When reset by the
Reset()
Function
------------
-
Queue System slightly changed (to fit with new Connection System)
-
Updated some Types
-
Small optimization Changes.
Get Version → 1.1.5 here:
Or the RBX Script File
:
Clock Library.rbxm (12.3 KB)
--------------------------------------------------------------
V → 1.1.6
1.1.6
Snapshot Changes
New Functions:
New Functions
PerpetuallySnapshot(SnapshotDelayTime: number?, PlaySnapshotSound: boolean?)
Takes Snapshots perpetually until you stop it using StopPerpetualSnapshot()
, you can change how
slow Snapshots are taken with the SnapshotDelayTime
Parameter, by default the DelayTime is 0 meaning it Snapshots are taken very fast, and multiple times per second.
You can also make it so the Snapshot Sound
does not play using the PlaySnapshotSound
Parameter, both these Parameters are optional but if you wish to use their default value just input nil, or nothing at all.
StopPerpetualSnapshot()
Stops Perpetual Snapshotting.
Snapshot Changes:
Snapshot Changes
Made Snapshots safer to use, previously Snapshots were very unsafe sometimes not taking Snapshots properly, and making bad conversion between properties.
Now it’s much better.
Bug fixes:
- Fixed bug where some
ClockParams
values if inputted nil, were not being set to their default value - Fixed bug where
OnElapse
Connection was not firing properly
Get Version → 1.1.6 here:
Or the RBX Script File
:
Clock Library.rbxm (12.7 KB)
--------------------------------------------------------------
V → 1.1.75
1.1.75
Added Documentation, New Functions, Settings and ability to reverse a ClockInstance’s Timer!
Added Documentation
Added Documentation
Added important Documentation
to Github to variables inside a ClockInstance that were previously not mentioned by me.
StartTime
Time in seconds that is the Duration (Set by SetDuration()
) of a ClockInstance’s Timer or the “StartTime” of a ClockInstance’s Timer if not reversed, if ClockInstance is reversed it’s Timer will keep running until it reaches this variable.
TimeElapsed
Time that has passed since the start of a ClockInstance’s Timer.
RunningTime
Time within a ClockInstance’s Timer, not to be mistaken with TimeElapsed
.
ElapsedStint
Time that has passed since the start of a ClockInstance’s Timer, is used to check if it’s higher than the ClockInstance’s Stint
value
To fire the OnStint
Connection, if greater than or equal to the Stint
value it will fire the OnStint
connection and be set back to 0
to try and fire the Connection again.
These variables are very important when it comes to a ClockInstance’s Timer.
New Functions
New Functions
ReverseClock()
Reverses Clock by making it’s Timer go from the default, StartTime (Duration set by SetDuration()
→ 0 to:
0 → StartTime. If Clock is already reversed when executing this function it will revert back to the default: StartTime → 0.
IsReversed()
Returns boolean that if true means the ClockInstance’s Timer is reversed, if false means it’s not reversed.
Returns: (boolean)
GetRunningTime()
Gets ands returns the ClockInstance’s Running Time variable ClockInstance.RunningTime
which is the current Time within a ClockInstance’s Timer.
Returns: (number)
New ClockParams Settings
New ClockParams Settings
ShowUITextAsRunningTime
Shows UIText as the RunningTime
variable inside a ClockInstance.
Note that the Text shown in the UIText
will have used math.round() first, to round the RunningTime
variable.
Ability reverse A ClockInstance’s Timer!
Ability reverse A ClockInstance's Timer!
You can now reverse a ClockInstance’s Timer, now what do i mean by this?
Normally and by default
a ClockInstance’s Timer runs like this:
StartTime
→ 0 seconds.
But with this new feature you can make it’s Timer run like this:
0 seconds → ``StartTime`
Basically reversing it.
Feature being shown via video (Streamable website):
New Connection Parameters
New Connection Parameters
OnElapse
and OnStint
connections have a new Parameter
, that is replacing previous deltaTime
Parameter.
RunningTime
: RunningTime
Variable of the ClockInstance.
Get Version → 1.1.75 here:
Or the RBX Script File
:
Clock Library (1.1.75).rbxm (13.6 KB)
--------------------------------------------------------------
CLOCK LIBRARY DOWNLOADS
-
Clock Library Asset
RBX Script File
Clock Library (1.1.75).rbxm (13.6 KB)