Accurate timespan to seconds

  • Welcome to skUnity!

    Welcome to skUnity! This is a forum where members of the Skript community can communicate and interact. Skript Resource Creators can post their Resources for all to see and use.

    If you haven't done so already, feel free to join our official Discord server to expand your level of interaction with the comminuty!

    Now, what are you waiting for? Join the community now!

  • LOOKING FOR A VERSION OF SKRIPT?

    You can always check out skUnity Downloads for downloads and any other information about Skript!

Status
Not open for further replies.

HenryRenYz

Member
Sep 5, 2020
2
0
1
23
Hi, I want to use the amount of time between 2 date to calculate something(for example velocity, accerelation, dps, etc.) but I found that it's difficult to convert timespan into seconds or ticks.

I know how to convert timespan into seconds but that's too inaccurate on the last second, and skript-mirror does not seem to work in 1.16.2

Help me please if you have any idea on it.

Code:
set {_timespan1} to 111 seconds before now
        set {_num} to difference between {_timespan1} and now
        send action bar "&6&l%{_num}%" to loop-player
 
Status
Not open for further replies.