Results 1 to 14 of 14

Thread: GetSystemTime

  1. #1
    Join Date
    Dec 2009
    Location
    R_GetPlayerLoc;
    Posts
    2,235
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default GetSystemTime

    Ive seen it in many scripts... Just wondering what the heck it does or records.

    I know its got something to do with time...

    Thanks for helping
    "Logic never changes, just the syntax" - Kyle Undefined?

    Remember, The Edit Button Is There For A Reason!!!

  2. #2
    Join Date
    Dec 2010
    Posts
    431
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Get the amount of milliseconds the system has been online for. Used for benchmarking and time outs.

  3. #3
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    You'll see

    Code:
    var
      T: Integer;
    
    begin
      T := GetSystemTime;
      WriteLn(T);
    end.
    out puts

    Code:
    19962745
    which is the number of milliseconds the system has been online for at any given time, this number increases 1 per a millisecond, so at any given time in the future it will be X amount greater than before and the difference between the current value and the old value will be the amount of milliseconds that have passed.

    Code:
    var
      T: Integer;
    
    begin
      T := GetSystemTime;
      Wait(1000);
      WriteLn(GetSystemTime - T);
    end.

  4. #4
    Join Date
    Dec 2009
    Location
    R_GetPlayerLoc;
    Posts
    2,235
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    Is it refering to the system of runescape or of simba or of smart?
    "Logic never changes, just the syntax" - Kyle Undefined?

    Remember, The Edit Button Is There For A Reason!!!

  5. #5
    Join Date
    Dec 2006
    Location
    Houston, TX USA
    Posts
    4,791
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by yago View Post
    Is it refering to the system of runescape or of simba or of smart?
    Your computer.

  6. #6
    Join Date
    Dec 2006
    Location
    Sydney, New South Wales, Australia
    Posts
    4,603
    Mentioned
    15 Post(s)
    Quoted
    42 Post(s)

    Default

    Here's an example of its' use (in English):

    I call GetSystemTime.
    I then run my wood chopping procedure.
    I then call GetSystemTime again and get the difference. I can then see how long it took to cut down those trees and if it has been cutting for more then 10 minutes then I know something is wrong (as it never takes 10 minutes to cut a tree!) and I can log that player out to prevent it from getting banned.

    You may contact me with any concerns you have.
    Are you a victim of harassment? Please notify me or any other staff member.

    | SRL Community Rules | SRL Live Help & Chat | Setting up Simba | F.A.Q's |

  7. #7
    Join Date
    Aug 2008
    Location
    Finland
    Posts
    2,851
    Mentioned
    3 Post(s)
    Quoted
    2 Post(s)

    Default

    There's also GetTimeRunning: integer; which also results in milliseconds, but this time the time your script has been running.

    Simba Code:
    begin
      Wait(1000);
      Writeln(GetTimeRunning);
    end.



    You can turn milliseconds into minutes like this:
    1000 = 1 second (just like 1000 millimeters is 1 meter)
    60 seconds = 1 minute

    --> 1000*60 = 1 minute
    --> 1000*60*60 = 1 hour

  8. #8
    Join Date
    Dec 2009
    Location
    R_GetPlayerLoc;
    Posts
    2,235
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    Ok thanks . Ill use these tactics. Thanks alot. Btw, I have a lot more questions
    "Logic never changes, just the syntax" - Kyle Undefined?

    Remember, The Edit Button Is There For A Reason!!!

  9. #9
    Join Date
    Jan 2007
    Location
    the middle of know-where
    Posts
    1,308
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    A little while back, I had a lot of time related questions. If it helps you out at all you can read through this thread.

    What other questions do you have?
    On vacation in NeverLand,
    Code:
    typedef int bool;
    enum { false, true };

  10. #10
    Join Date
    Dec 2009
    Location
    R_GetPlayerLoc;
    Posts
    2,235
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    Edit: Found A Way around the bank thing.

    Is there A way I can tell what floor my character is on?

    Like 1rst 2nd or 3rd floor of lumby castle?
    "Logic never changes, just the syntax" - Kyle Undefined?

    Remember, The Edit Button Is There For A Reason!!!

  11. #11
    Join Date
    Jan 2007
    Location
    the middle of know-where
    Posts
    1,308
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Right when you login? or when you are script navigating?

    login:
    - i dunno.

    script navigating:
    - well, you could add a simple floor counter.
    - - it would add and subtract so you know which floor you are on. make floor zero the base, + would be up, and - would be basement.
    On vacation in NeverLand,
    Code:
    typedef int bool;
    enum { false, true };

  12. #12
    Join Date
    Dec 2009
    Location
    R_GetPlayerLoc;
    Posts
    2,235
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    No, but I wanna do something as a failsafe to make sure I went up the lumby stairs. Ill use symbol finding but its innacurate so ... Untill Somebody else knows a way then Im screwed.
    "Logic never changes, just the syntax" - Kyle Undefined?

    Remember, The Edit Button Is There For A Reason!!!

  13. #13
    Join Date
    Nov 2010
    Location
    Australia
    Posts
    1,472
    Mentioned
    0 Post(s)
    Quoted
    8 Post(s)

    Default

    I think this will tell you what level you're on: GetPlaneIndex

  14. #14
    Join Date
    Dec 2009
    Location
    R_GetPlayerLoc;
    Posts
    2,235
    Mentioned
    0 Post(s)
    Quoted
    14 Post(s)

    Default

    Ok thank alot again for your help. Yes that was the correct function. As for now no more questions ... Off To fix my lumbylobcooker
    "Logic never changes, just the syntax" - Kyle Undefined?

    Remember, The Edit Button Is There For A Reason!!!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •