mirror of
https://github.com/nasa/trick.git
synced 2025-02-05 10:29:19 +00:00
Added code for set rt nap stats for clock spin as well. However, this might not be necessary.
This commit is contained in:
parent
7e94be8bcc
commit
9e87908352
@ -74,6 +74,7 @@ extern "C" {
|
|||||||
int exec_set_version_date_tag(const char * tag) ;
|
int exec_set_version_date_tag(const char * tag) ;
|
||||||
int exec_set_build_date(const char * date) ;
|
int exec_set_build_date(const char * date) ;
|
||||||
int exec_set_current_version(const char * version) ;
|
int exec_set_current_version(const char * version) ;
|
||||||
|
void exec_set_rt_nap_stats(long long clock_time_before_rt_nap, long long clock_time_after_rt_nap) ;
|
||||||
|
|
||||||
int exec_freeze(void) ;
|
int exec_freeze(void) ;
|
||||||
int exec_run(void) ;
|
int exec_run(void) ;
|
||||||
|
@ -10,7 +10,6 @@ PROGRAMMERS:
|
|||||||
|
|
||||||
#include "trick/Clock.hh"
|
#include "trick/Clock.hh"
|
||||||
#include "trick/exec_proto.h"
|
#include "trick/exec_proto.h"
|
||||||
#include "trick/exec_proto.hh"
|
|
||||||
#include "trick/release.h"
|
#include "trick/release.h"
|
||||||
|
|
||||||
Trick::Clock * the_clock = NULL ;
|
Trick::Clock * the_clock = NULL ;
|
||||||
@ -93,7 +92,7 @@ long long Trick::Clock::clock_spin(long long req_time) {
|
|||||||
time_before_rt_nap = wall_clock_time() ;
|
time_before_rt_nap = wall_clock_time() ;
|
||||||
RELEASE();
|
RELEASE();
|
||||||
time_after_rt_nap = wall_clock_time() ;
|
time_after_rt_nap = wall_clock_time() ;
|
||||||
exec_get_exec_cpp()->set_rt_nap_stats(time_before_rt_nap, time_after_rt_nap) ;
|
exec_set_rt_nap_stats(time_before_rt_nap, time_after_rt_nap) ;
|
||||||
}
|
}
|
||||||
curr_time = clock_time();
|
curr_time = clock_time();
|
||||||
}
|
}
|
||||||
|
@ -21,7 +21,7 @@ BASE_OBJECTS = ../object_${TRICK_HOST_CPU}/Clock.o\
|
|||||||
../object_${TRICK_HOST_CPU}/clock_c_intf.o
|
../object_${TRICK_HOST_CPU}/clock_c_intf.o
|
||||||
|
|
||||||
|
|
||||||
GETTIMEOFDAY_CLOCK_OBJECTS = ${BASE_OBJECTS} GetTimeOfDayClock_test.o ../object_${TRICK_HOST_CPU}/GetTimeOfDayClock.o exec_get_rt_nap_stub.o
|
GETTIMEOFDAY_CLOCK_OBJECTS = ${BASE_OBJECTS} GetTimeOfDayClock_test.o ../object_${TRICK_HOST_CPU}/GetTimeOfDayClock.o exec_get_rt_nap_stub.o exec_set_rt_nap_stats.o
|
||||||
|
|
||||||
# All tests produced by this Makefile. Remember to add new tests you
|
# All tests produced by this Makefile. Remember to add new tests you
|
||||||
# created to the list.
|
# created to the list.
|
||||||
|
@ -737,6 +737,17 @@ extern "C" const char * exec_get_current_version() {
|
|||||||
return NULL ;
|
return NULL ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @relates Trick::Executive
|
||||||
|
* @copydoc Trick::Executive::set_rt_nap_stats
|
||||||
|
* C wrapper for Trick::Executive::set_rt_nap_stats
|
||||||
|
*/
|
||||||
|
extern "C" void exec_set_rt_nap_stats(long long clock_time_before_rt_nap, long long clock_time_after_rt_nap) {
|
||||||
|
if ( the_exec != NULL ) {
|
||||||
|
the_exec->set_rt_nap_stats(clock_time_before_rt_nap, clock_time_before_rt_nap) ;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @relates Trick::Executive
|
* @relates Trick::Executive
|
||||||
* @userdesc Raise a signal on the main thread to terminate the simuation immediately.
|
* @userdesc Raise a signal on the main thread to terminate the simuation immediately.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user