Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Martin Heyden
LabProcesses.jl
Commits
4133ed7e
Commit
4133ed7e
authored
Aug 25, 2017
by
Fredrik Bagge Carlson
Browse files
Use Lib.systemsleep in control loop
parent
b2f44909
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/utilities.jl
View file @
4133ed7e
...
...
@@ -23,7 +23,7 @@ macro periodically(h, simulation, body)
local
start_time
=
time
()
$
(
esc
(
body
))
local
execution_time
=
time
()
-
start_time
$
(
esc
(
simulation
))
||
sleep
(
max
(
0
,
$
(
esc
(
h
))
-
execution_time
))
$
(
esc
(
simulation
))
||
Libc
.
system
sleep
(
max
(
0
,
$
(
esc
(
h
))
-
execution_time
))
end
end
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment