- Added support for accessing the exe file management functions from scripts

- Fixed a bug in hmdata.c
- Fixed an issue with tempoerature writing through RemObjects in mesure
- Added auxiliary reflections to tasub
- Make maximize use soft motor positions
This commit is contained in:
koennecke
2006-11-24 15:51:19 +00:00
parent f15cb4c6db
commit 0825c48986
24 changed files with 328 additions and 253 deletions

View File

@ -13,9 +13,9 @@ struct Statistics {
Statistics *next;
};
static Statistics *current;
static Statistics *current = NULL;
static tv_t last, lastStat;
static Statistics *idle = NULL, *list;
static Statistics *idle = NULL, *list = NULL;
static int init = 1;
/*-----------------------------------------------------------------------*/
tv_t timeDif(tv_t t1, tv_t t2) {
@ -128,7 +128,9 @@ Statistics *StatisticsBegin(Statistics *stat) {
res = current;
gettimeofday(&now, 0);
timeAdd(&current->tim, timeDif(last, now));
if(current != NULL){
timeAdd(&current->tim, timeDif(last, now));
}
last = now;
current = stat;
stat->last = now;
@ -142,10 +144,12 @@ void StatisticsEnd(Statistics *stat) {
gettimeofday(&now, 0);
timeAdd(&current->tim, timeDif(last, now));
last = now;
if (current->last.tv_sec >= 0) {
timeAdd(&current->total, timeDif(current->last, now));
if(current != NULL){
if (current->last.tv_sec >= 0) {
timeAdd(&current->total, timeDif(current->last, now));
}
current->last.tv_sec = -1;
}
current->last.tv_sec = -1;
current = stat;
}
/*-----------------------------------------------------------------------*/