Signup Now
Results 1 to 5 of 5
  1. #1
    Wind Tester
    Join Date
    Dec 2013
    Location
    Warsaw, Poland
    Posts
    2,569
    Reputation
    149
    Rep Power
    28

    Reversed time() and user option

    Hey guys, i have 2 questions to you, maybe someone can help me out with this.
    1) I need reversed time() function, which would change "14:30" (mm:ss) into sec/ms
    2) Is it possible to make something like this?

    /Imba

  2. #2
    Free User
    Join Date
    Dec 2013
    Location
    Sweden
    Posts
    117
    Reputation
    15
    Rep Power
    21
    Do you get the time as a string? If so, you can use string.explode on the ":" to get each one separately.

    Then simply hours * 60 * 60, minutes * 60, and seconds as they are and sum is total amount of seconds. Just * 1000 for milliseconds.

    If I understood you wrong, please explain further.
    Last edited by Colandus; 01-05-2014 at 10:13 PM.
    Regards,
    Colandus

  3. #3
    Free User Donatello's Avatar
    Join Date
    Dec 2013
    Location
    Tuscany, Italy
    Posts
    398
    Reputation
    51
    Rep Power
    22
    tosec()

  4. #4
    Moderator Raphael's Avatar
    Join Date
    Dec 2013
    Location
    raphseller.com
    Posts
    2,437
    Reputation
    309
    Rep Power
    29
    1) You can use tosec(), from Lucas' lib.

    2) No, it's not.

  5. #5
    Wind Tester
    Join Date
    Dec 2013
    Location
    Warsaw, Poland
    Posts
    2,569
    Reputation
    149
    Rep Power
    28
    tosec, i was searching for something with time in library :P Thanks!

 

 

Posting Permissions

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