Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Why3
why3
Commits
ef522d6f
Commit
ef522d6f
authored
Apr 22, 2010
by
Andrei Paskevich
Browse files
use Unix.gettimeofday instead of Unix.time in Call_provers
parent
689f7898
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/driver/call_provers.ml
View file @
ef522d6f
...
...
@@ -59,13 +59,13 @@ let rec grep out l = match l with
with
Not_found
->
grep
out
l
end
let
call_prover
debug
command
opt_cout
buffer
=
let
time
=
Unix
.
time
()
in
let
time
=
Unix
.
get
time
ofday
()
in
let
(
cin
,
cout
)
as
p
=
Unix
.
open_process
command
in
let
cout
=
match
opt_cout
with
Some
c
->
c
|
_
->
cout
in
Buffer
.
output_buffer
cout
buffer
;
close_out
cout
;
let
out
=
channel_contents
cin
in
let
ret
=
Unix
.
close_process
p
in
let
time
=
Unix
.
time
()
-.
time
in
let
time
=
Unix
.
get
time
ofday
()
-.
time
in
if
debug
then
eprintf
"Call_provers: prover output:@
\n
%s@."
out
;
ret
,
out
,
time
...
...
@@ -107,7 +107,7 @@ let call_on_buffer ?(debug=false) ~command ~timelimit ~memlimit
(
try
List
.
assoc
n
exitcodes
with
Not_found
->
grep
out
regexps
)
in
let
ans
=
match
ans
with
|
HighFailure
|
HighFailure
when
timelimit
>
0
&&
time
>=
(
0
.
9
*.
float
timelimit
)
->
Timeout
|
_
->
ans
in
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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