Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function obj:getRealTime(raw)
- local handle = self.tmpfs.open("/time", "w")
- self.tmpfs.write(handle, "time")
- self.tmpfs.close(handle)
- return raw and self.tmpfs.lastModified("/time") / 1000 or
- os.date("%Y-%m-%d %H:%M:%S", self.tmpfs.lastModified("/time") / 1000) -- last arg is timestamp
- end
Advertisement
Add Comment
Please, Sign In to add comment