mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-09-04 14:17:52 -04:00
Clean up the timer 'init' and 'fini' calls, etc.
This commit is contained in:
parent
1a5815f084
commit
61d9d45be1
@ -20,7 +20,6 @@ subroutine decode0(dd,ss,savg,nstandalone)
|
|||||||
|
|
||||||
call sec0(0,tquick)
|
call sec0(0,tquick)
|
||||||
ncand=0
|
ncand=0
|
||||||
call timer('decode0 ',0)
|
|
||||||
if(newdat.ne.0) then
|
if(newdat.ne.0) then
|
||||||
nz=96000*nhsym/5.3833
|
nz=96000*nhsym/5.3833
|
||||||
hist=0
|
hist=0
|
||||||
@ -59,7 +58,6 @@ subroutine decode0(dd,ss,savg,nstandalone)
|
|||||||
neme,ndepth,nstandalone,hiscall,hisgrid,nhsym,nfsample, &
|
neme,ndepth,nstandalone,hiscall,hisgrid,nhsym,nfsample, &
|
||||||
ndiskdat,nxpol,nmode,ndop00,ncand)
|
ndiskdat,nxpol,nmode,ndop00,ncand)
|
||||||
call timer('map65a ',1)
|
call timer('map65a ',1)
|
||||||
call timer('decode0 ',1)
|
|
||||||
|
|
||||||
if(nhsym.eq.nhsym2) write(*,1012) ndecodes,ncand
|
if(nhsym.eq.nhsym2) write(*,1012) ndecodes,ncand
|
||||||
1012 format('<DecodeFinished>',2i4)
|
1012 format('<DecodeFinished>',2i4)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
!subroutine ftninit()
|
!subroutine ftninit()
|
||||||
subroutine ftninit
|
subroutine ftninit
|
||||||
|
|
||||||
use timer_module, only: timer
|
use timer_impl, only: init_timer !,fini_timer, limtrace
|
||||||
use, intrinsic :: iso_c_binding, only: C_NULL_CHAR
|
use, intrinsic :: iso_c_binding, only: C_NULL_CHAR
|
||||||
use FFTW3
|
use FFTW3
|
||||||
! character*(*) appd
|
! character*(*) appd
|
||||||
@ -10,6 +10,9 @@ subroutine ftninit
|
|||||||
character wisfile*256
|
character wisfile*256
|
||||||
common/pfxcom/addpfx
|
common/pfxcom/addpfx
|
||||||
|
|
||||||
|
lu=8
|
||||||
|
call init_timer('./timer.out')
|
||||||
|
|
||||||
appd='.'
|
appd='.'
|
||||||
addpfx=' '
|
addpfx=' '
|
||||||
call pfxdump(appd//'/prefixes.txt')
|
call pfxdump(appd//'/prefixes.txt')
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
subroutine m65c
|
subroutine m65c(itimer)
|
||||||
|
|
||||||
use timer_module, only: timer
|
use timer_module, only: timer
|
||||||
use timer_impl, only: init_timer !, limtrace
|
use timer_impl, only: fini_timer !, limtrace
|
||||||
use, intrinsic :: iso_c_binding, only: C_NULL_CHAR
|
use, intrinsic :: iso_c_binding, only: C_NULL_CHAR
|
||||||
use FFTW3
|
use FFTW3
|
||||||
use q65
|
use q65
|
||||||
@ -29,21 +29,27 @@ subroutine m65c
|
|||||||
data first/.true./
|
data first/.true./
|
||||||
save first,cwd
|
save first,cwd
|
||||||
|
|
||||||
|
if(itimer.ne.0) then
|
||||||
|
! call timer('q65w ',1)
|
||||||
|
! call timer('q65w ',101)
|
||||||
|
call timer('decode0 ',101)
|
||||||
|
call fini_timer
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
|
||||||
lq65w=.true.
|
lq65w=.true.
|
||||||
lq65w2=.true.
|
lq65w2=.true.
|
||||||
nparams=nparams0 !Copy parameters into common/npar/
|
nparams=nparams0 !Copy parameters into common/npar/
|
||||||
datetime(18:20)=':00'
|
datetime(18:20)=':00'
|
||||||
|
|
||||||
! if(first) then
|
! if(first) call timer('q65w ',0)
|
||||||
! call getcwd(cwd)
|
! first=.false.
|
||||||
! call ftninit(trim(cwd))
|
|
||||||
! call init_timer (trim(cwd)//'/timer.out')
|
|
||||||
! first=.false.
|
|
||||||
! endif
|
|
||||||
|
|
||||||
npatience=1
|
npatience=1
|
||||||
nstandalone=0
|
nstandalone=0
|
||||||
if(sum(nparams).ne.0) call decode0(dd,ss,savg,nstandalone)
|
call timer('decode0 ',0)
|
||||||
|
call decode0(dd,ss,savg,nstandalone)
|
||||||
|
call timer('decode0 ',1)
|
||||||
|
|
||||||
return
|
return
|
||||||
end subroutine m65c
|
end subroutine m65c
|
||||||
|
@ -233,6 +233,9 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
MainWindow::~MainWindow()
|
MainWindow::~MainWindow()
|
||||||
{
|
{
|
||||||
writeSettings();
|
writeSettings();
|
||||||
|
int itimer=1;
|
||||||
|
m65c_(&itimer);
|
||||||
|
|
||||||
if (soundInThread.isRunning()) {
|
if (soundInThread.isRunning()) {
|
||||||
soundInThread.quit();
|
soundInThread.quit();
|
||||||
soundInThread.wait(3000);
|
soundInThread.wait(3000);
|
||||||
@ -751,7 +754,7 @@ void MainWindow::on_stopButton_clicked() //stopButton
|
|||||||
{
|
{
|
||||||
m_monitoring=false;
|
m_monitoring=false;
|
||||||
soundInThread.setMonitoring(m_monitoring);
|
soundInThread.setMonitoring(m_monitoring);
|
||||||
m_loopall=false;
|
m_loopall=false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::msgBox(QString t) //msgBox
|
void MainWindow::msgBox(QString t) //msgBox
|
||||||
@ -1033,7 +1036,8 @@ void MainWindow::decode() //decode()
|
|||||||
// QFile lockFile(m_appDir + "/.lock"); // Allow m65 to start
|
// QFile lockFile(m_appDir + "/.lock"); // Allow m65 to start
|
||||||
// lockFile.remove();
|
// lockFile.remove();
|
||||||
|
|
||||||
watcher3.setFuture(QtConcurrent::run (std::bind (m65c_)));
|
int itimer=0;
|
||||||
|
watcher3.setFuture(QtConcurrent::run (std::bind (m65c_, &itimer)));
|
||||||
|
|
||||||
decodeBusy(true);
|
decodeBusy(true);
|
||||||
}
|
}
|
||||||
@ -1067,7 +1071,7 @@ void MainWindow::m65_error (QProcess::ProcessError)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::readFromStdout() //readFromStdout
|
void MainWindow::readFromStdout() //readFromStdout
|
||||||
{
|
{
|
||||||
while(proc_m65.canReadLine())
|
while(proc_m65.canReadLine())
|
||||||
{
|
{
|
||||||
QByteArray t=proc_m65.readLine();
|
QByteArray t=proc_m65.readLine();
|
||||||
@ -1302,7 +1306,7 @@ void MainWindow::on_addButton_clicked() //Add button
|
|||||||
} while(!s.isNull());
|
} while(!s.isNull());
|
||||||
if(hc>hc1 && !m_call3Modified) out << newEntry + "\n";
|
if(hc>hc1 && !m_call3Modified) out << newEntry + "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(m_call3Modified) {
|
if(m_call3Modified) {
|
||||||
auto const& old_path = m_appDir + "/CALL3.OLD";
|
auto const& old_path = m_appDir + "/CALL3.OLD";
|
||||||
QFile f0 {old_path};
|
QFile f0 {old_path};
|
||||||
|
@ -231,7 +231,7 @@ extern "C" {
|
|||||||
void astrosub00_ (int* nyear, int* month, int* nday, double* uth, int* nfreq,
|
void astrosub00_ (int* nyear, int* month, int* nday, double* uth, int* nfreq,
|
||||||
const char* mygrid, int* ndop00, int len1);
|
const char* mygrid, int* ndop00, int len1);
|
||||||
|
|
||||||
void m65c_(void);
|
void m65c_(int* itimer);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // MAINWINDOW_H
|
#endif // MAINWINDOW_H
|
||||||
|
Loading…
x
Reference in New Issue
Block a user