Skip to content

Commit e0eaf2f

Browse files
committed
No GC during simulations < 1002s
1 parent 9b18ee3 commit e0eaf2f

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

examples/autopilot.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ function simulate(integrator, stopped=true)
157157
GC.enable(true)
158158
GC.gc()
159159
mem_start=Sys.total_memory()/1e9
160-
if Sys.total_memory()/1e9 > 24 && app.max_time < 500
160+
if Sys.total_memory()/1e9 > 24 && app.max_time < 1002
161161
GC.enable(false)
162162
end
163163
max_time = 0
@@ -259,9 +259,9 @@ function simulate(integrator, stopped=true)
259259
wait_until(start_time_ns + 1e9*app.dt/ratio, always_sleep=true)
260260
mtime = 0
261261
if i > 10/app.dt
262-
# if we missed the deadline by more than 5 ms
262+
# if we missed the deadline by more than 1 ms
263263
mtime = time_ns() - start_time_ns
264-
if mtime > app.dt*1e9/ratio + 5e6
264+
if mtime > app.dt*1e9/ratio + 1e6
265265
print(".")
266266
j += 1
267267
end

0 commit comments

Comments
 (0)