Compare commits
No commits in common. "ab604c84f781f9c90816c1dab0d546adab33a9ce" and "054f58609bb7f92c77720474332d9c933d000078" have entirely different histories.
ab604c84f7
...
054f58609b
@ -1,17 +0,0 @@
|
|||||||
local minitel = require "minitel"
|
|
||||||
local event = require "event"
|
|
||||||
local tArgs = {...}
|
|
||||||
local addr = tArgs[1]
|
|
||||||
local times = tonumber(tArgs[2]) or 5
|
|
||||||
local timeout = tonumber(tArgs[3]) or 30
|
|
||||||
for i = 1, times do
|
|
||||||
local ipt = computer.uptime()
|
|
||||||
local pid = minitel.genPacketID()
|
|
||||||
computer.pushSignal("net_send",1,addr,0,"ping",pid)
|
|
||||||
local t,a = event.pull(timeout,"net_ack")
|
|
||||||
if t == "net_ack" and a == pid then
|
|
||||||
print("Ping reply: "..tostring(computer.uptime()-ipt).." seconds.")
|
|
||||||
else
|
|
||||||
print("Timed out.")
|
|
||||||
end
|
|
||||||
end
|
|
@ -7,7 +7,6 @@ function shenv.quit()
|
|||||||
end
|
end
|
||||||
shenv.cd = os.chdir
|
shenv.cd = os.chdir
|
||||||
shenv.mkdir = fs.makeDirectory
|
shenv.mkdir = fs.makeDirectory
|
||||||
shenv.cp = fs.copy
|
|
||||||
local function findPath(name)
|
local function findPath(name)
|
||||||
path = os.getenv("PATH") or "/boot/exec"
|
path = os.getenv("PATH") or "/boot/exec"
|
||||||
for l in path:gmatch("[^\n]+") do
|
for l in path:gmatch("[^\n]+") do
|
||||||
|
@ -47,6 +47,5 @@ while true do
|
|||||||
until rsize <= 1
|
until rsize <= 1
|
||||||
end
|
end
|
||||||
print(fsize)
|
print(fsize)
|
||||||
coroutine.yield()
|
|
||||||
end
|
end
|
||||||
fi:close()
|
fi:close()
|
||||||
|
Loading…
Reference in New Issue
Block a user