Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
easyWave
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Merge Requests
0
Merge Requests
0
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
geoperil
easyWave
Commits
2a61429a
Commit
2a61429a
authored
Sep 02, 2015
by
Johannes Spazier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed time measurement in multi-threaded version.
parent
28eaf07f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
code/trunk/src/EasyWave.cpp
code/trunk/src/EasyWave.cpp
+7
-5
No files found.
code/trunk/src/EasyWave.cpp
View file @
2a61429a
...
...
@@ -64,7 +64,8 @@ int commandLineHelp( void );
int
main
(
int
argc
,
char
**
argv
)
{
char
buf
[
1024
];
int
ierr
,
argn
,
elapsed
;
int
ierr
,
argn
;
long
int
elapsed
;
int
lastProgress
,
lastPropagation
,
lastDump
;
int
loop
;
...
...
@@ -114,7 +115,7 @@ int main( int argc, char **argv )
// Main loop
Log
.
print
(
"Starting main loop..."
);
timespec
start
,
end
;
timespec
start
,
inter
,
end
;
clock_gettime
(
CLOCK_MONOTONIC
,
&
start
);
for
(
Par
.
time
=
0
,
loop
=
1
,
lastProgress
=
Par
.
outProgress
,
lastPropagation
=
Par
.
outPropagation
,
lastDump
=
0
;
...
...
@@ -128,12 +129,13 @@ int main( int argc, char **argv )
Node
.
run
();
elapsed
=
((
int
)
clock
())
/
CLOCKS_PER_SEC
;
clock_gettime
(
CLOCK_MONOTONIC
,
&
inter
);
elapsed
=
diff
(
start
,
inter
)
*
1000
;
if
(
Par
.
outProgress
)
{
if
(
lastProgress
>=
Par
.
outProgress
)
{
printf
(
"Model time = %s, elapsed: %ld msec
\n
"
,
utlTimeSplitString
(
Par
.
time
),
clock
()
/
(
CLOCKS_PER_SEC
/
1000
)
);
Log
.
print
(
"Model time = %s, elapsed: %ld msec"
,
utlTimeSplitString
(
Par
.
time
),
clock
()
/
(
CLOCKS_PER_SEC
/
1000
)
);
printf
(
"Model time = %s, elapsed: %ld msec
\n
"
,
utlTimeSplitString
(
Par
.
time
),
elapsed
);
Log
.
print
(
"Model time = %s, elapsed: %ld msec"
,
utlTimeSplitString
(
Par
.
time
),
elapsed
);
lastProgress
=
0
;
}
}
...
...
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