diff options
author | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-05-15 13:39:01 +0200 |
---|---|---|
committer | David Monniaux <david.monniaux@univ-grenoble-alpes.fr> | 2019-05-15 13:39:01 +0200 |
commit | 355a9272b5a800f9652707ed5854d7be529b872c (patch) | |
tree | 989a001ddf5d8f57a2d7a39b638ae10d6f1f3b2b /test/monniaux/lustrev4_lv6-en-2cgc_heater_control | |
parent | 0af2ea25f0df045d6d45ae0487c6d5022490a4c4 (diff) | |
download | compcert-kvx-355a9272b5a800f9652707ed5854d7be529b872c.tar.gz compcert-kvx-355a9272b5a800f9652707ed5854d7be529b872c.zip |
Heater example from Lustre v4
Diffstat (limited to 'test/monniaux/lustrev4_lv6-en-2cgc_heater_control')
-rw-r--r-- | test/monniaux/lustrev4_lv6-en-2cgc_heater_control/heater_control_heater_control_loop.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/test/monniaux/lustrev4_lv6-en-2cgc_heater_control/heater_control_heater_control_loop.c b/test/monniaux/lustrev4_lv6-en-2cgc_heater_control/heater_control_heater_control_loop.c index e4037e5a..d1a01268 100644 --- a/test/monniaux/lustrev4_lv6-en-2cgc_heater_control/heater_control_heater_control_loop.c +++ b/test/monniaux/lustrev4_lv6-en-2cgc_heater_control/heater_control_heater_control_loop.c @@ -6,6 +6,7 @@ #include <stdio.h> #include <unistd.h> #include "../dm_random.c" +#include "../clock.h" #include "heater_control_heater_control.h" /* MACROS DEFINITIONS ****************/ @@ -39,6 +40,10 @@ int main(){ _boolean Heat_on; heater_control_heater_control_ctx_type ctx_struct; heater_control_heater_control_ctx_type* ctx = &ctx_struct; + + clock_prepare(); + clock_start(); + heater_control_heater_control_ctx_init(ctx); /* Main loop */ @@ -48,8 +53,11 @@ int main(){ T2 = _get_real("T2"); T3 = _get_real("T3"); heater_control_heater_control_step(T,T1,T2,T3,&Heat_on,ctx); - _put_bool("Heat_on", Heat_on); + // _put_bool("Heat_on", Heat_on); } - return 1; - + + clock_stop(); + print_total_clock(); + + return 1; } |