Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- credits to nolicaiks for something
- function getTime(root)
- local time = tonumber((root and (type(root)=="function" and root()) or ((type(root)=="string" or type(root)=="number") and tonumber(root))) or (tick and tick()) or (os.time()) );
- local secs = math.floor(time % 60);
- local mins = math.floor(time / 60 % 60);
- local hours = math.floor(time / 3600 % 24);
- return string.format("%02i:%02i:%02i", hours, mins, secs);
- end;
- print("global: "..getTime(os.time));
- print("local: "..getTime(tick));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement