1. 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!


    You can always check out our Wiki for downloads and any other information about Skript!

Dismiss Notice
This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Accurate timespan to seconds

Discussion in 'Skript' started by HenryRenYz, Sep 15, 2020.

Thread Status:
Not open for further replies.
  1. HenryRenYz

    HenryRenYz Member

    Sep 5, 2020
    Likes Received:
    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 (Text):
    1. set {_timespan1} to 111 seconds before now
    2.         set {_num} to difference between {_timespan1} and now
    3.         send action bar "&6&l%{_num}%" to loop-player
Thread Status:
Not open for further replies.

Share This Page