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
processes
LabProcesses.jl
Commits
4133ed7e
Commit
4133ed7e
authored
Aug 25, 2017
by
Fredrik Bagge Carlson
Browse files
Use Lib.systemsleep in control loop
parent
b2f44909
Pipeline
#522
passed with stage
in 1 minute and 28 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
src/utilities.jl
View file @
4133ed7e
...
@@ -23,7 +23,7 @@ macro periodically(h, simulation, body)
...
@@ -23,7 +23,7 @@ macro periodically(h, simulation, body)
local
start_time
=
time
()
local
start_time
=
time
()
$
(
esc
(
body
))
$
(
esc
(
body
))
local
execution_time
=
time
()
-
start_time
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
end
end
...
...
Write
Preview
Markdown
is supported
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