mirror of
https://github.com/lune-org/lune.git
synced 2024-12-12 13:00:37 +00:00
Use lower timeout on non-windows in process spawn async sleep test
This commit is contained in:
parent
f860821498
commit
f29636b038
1 changed files with 8 additions and 5 deletions
|
@ -9,11 +9,14 @@ local IS_WINDOWS = process.os == "windows"
|
||||||
local SLEEP_DURATION = 1 / 4
|
local SLEEP_DURATION = 1 / 4
|
||||||
local SLEEP_SAMPLES = 2
|
local SLEEP_SAMPLES = 2
|
||||||
|
|
||||||
local thread2 = task.delay(30, function()
|
local thread2 = task.delay(
|
||||||
|
if IS_WINDOWS then 30 else (SLEEP_DURATION * SLEEP_SAMPLES * 2),
|
||||||
|
function()
|
||||||
stdio.ewrite("Spawning a sleep process should take a reasonable amount of time\n")
|
stdio.ewrite("Spawning a sleep process should take a reasonable amount of time\n")
|
||||||
task.wait(1)
|
task.wait(1)
|
||||||
process.exit(1)
|
process.exit(1)
|
||||||
end)
|
end
|
||||||
|
)
|
||||||
|
|
||||||
local sleepStart = os.clock()
|
local sleepStart = os.clock()
|
||||||
local sleepCounter = 0
|
local sleepCounter = 0
|
||||||
|
|
Loading…
Reference in a new issue