Skip to content

Instantly share code, notes, and snippets.

@WhiteyDude
Last active May 23, 2018 05:39
Show Gist options
  • Save WhiteyDude/1996fdd2eb613882985764413551b1f4 to your computer and use it in GitHub Desktop.
Save WhiteyDude/1996fdd2eb613882985764413551b1f4 to your computer and use it in GitHub Desktop.
require 'pl.stringx'
stringx.import()
socket = require 'socket'
posix = require 'posix'
function get_number()
return stringx.rjust(tostring(os.date('*t')['sec']) .. tostring(socket.gettime()):split('.',2)[2]:sub(3),4,"0")
end
for i=1,100 do
print(get_number())
posix.nanosleep(0,1)
end
2041
2043
2044
2046
2047
2049
0205
2051
2053
2054
2055
2058
2059
0206
2062
2063
2065
2066
2067
2069
0207
2071
2073
2074
2075
2076
2077
2079
0208
2082
2083
2085
2087
2088
0209
2091
2093
2095
2096
2098
2099
0020
2002
2003
2004
2006
2007
2008
2009
0201
2011
2013
2014
2015
2017
2019
0202
2021
2023
2024
2025
2026
2028
2029
0203
2031
2033
2034
2035
2036
2038
2039
0204
2042
2043
2045
2046
2048
2049
0205
2051
2053
2054
2055
2056
2058
0206
2061
2063
2064
2065
2066
2068
2069
0207
2071
2073
2074
2075
2076
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment