fix profon profon (obs from Bernd).

This commit is contained in:
Vitor Santos Costa 2010-11-21 23:04:38 +00:00
parent cf59f9aedc
commit 133e562adb
1 changed files with 16 additions and 14 deletions

View File

@ -1156,20 +1156,6 @@ static Int start_profilers(int msec)
}
static Int profon(void) {
Term p;
p=Deref(ARG1);
return(start_profilers(IntOfTerm(p)));
}
static Int profon0(void) {
return(start_profilers(TIMER_DEFAULT));
}
static Int profison(void) {
return (ProfilerOn > 0);
}
static Int profoff(void) {
if (ProfilerOn>0) {
setitimer(ITIMER_PROF,NULL,NULL);
@ -1179,6 +1165,22 @@ static Int profoff(void) {
return FALSE;
}
static Int profon(void) {
Term p;
profoff();
p=Deref(ARG1);
return(start_profilers(IntOfTerm(p)));
}
static Int profon0(void) {
profoff();
return(start_profilers(TIMER_DEFAULT));
}
static Int profison(void) {
return (ProfilerOn > 0);
}
static Int profalt(void) {
if (ProfilerOn==0) return(FALSE);
if (ProfilerOn==-1) return profon();