Advertisement
yonidrori

Untitled

Sep 13th, 2015
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. GetTime=function(_time)
  2. local _day,_hour,_min,_sec;
  3. _day=math.floor(_time/86400);
  4. _time=_time-_day*86400;
  5. _hour=math.floor(_time/3600);
  6. _time=_time-_hour*3600;
  7. _min=math.floor(_time/60);
  8. _time=_time-_min*60;
  9. _sec=math.floor(_time/1);
  10. local __time='';
  11. if(tostring(_hour):len()==1)then
  12. __time=__time..'0'.._hour..':';
  13. else
  14. __time=__time.._hour..':';
  15. end;
  16. if(tostring(_min):len()==1)then
  17. __time=__time..'0'.._min..':';
  18. else
  19. __time=__time.._min..':';
  20. end;
  21. if(tostring(_sec):len()==1)then
  22. __time=__time..'0'.._sec;
  23. else
  24. __time=__time.._sec;
  25. end;
  26. return(__time);
  27. end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement