Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cla_prosim_driver
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fmg005
cla_prosim_driver
Commits
91463522
Commit
91463522
authored
May 03, 2018
by
fmg005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug fix
parent
5c25f4bf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
Realtime.cpp
Realtime.cpp
+5
-2
No files found.
Realtime.cpp
View file @
91463522
...
...
@@ -19,8 +19,11 @@ void Realtime::AdvanceModelTime(double time) {
/* start time for the next execution */
m_real_time
=
m_start
+
(
m_next_start
*
time
);
/* check if simuation takes longer than expected */
if
((
m_end
-
m_start
)
>
m_real_time
)
/* check if simuation takes longer than expected
i.e., time = 1.0s
clocks (1s real-time equivalent) = CLOCKS_PER_SEC * time
*/
if
((
m_end
-
m_start
)
>
(
CLOCKS_PER_SEC
*
time
))
m_logger
->
error
(
"Simulation too slow"
);
/* wait until start time of next execution is reached i.e., 1s of real-time */
...
...
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