timer fix

svn path=/trunk/boinc/; revision=854
This commit is contained in:
Eric Heien 2003-02-03 22:44:48 +00:00
parent 893b1e709b
commit cd97685adf
1 changed files with 8 additions and 7 deletions

View File

@ -335,9 +335,7 @@ void CMainWindow::UpdateGUI(CLIENT_STATE* pcs)
// time
double xtime = 0;
if(fi->fxp) {
xtime = (double)time(0) - fi->fxp->start_time;
}
xtime = fi->time_so_far;
int xhour = (int)(xtime / (60 * 60));
int xmin = (int)(xtime / 60) % 60;
int xsec = (int)(xtime) % 60;
@ -918,7 +916,10 @@ void CMainWindow::PostNcDestroy()
// function: creates a thread to signal a timeout
void CMainWindow::SetTimeOut()
{
CreateThread(NULL, 0, TimeOutThreadProc, GetSafeHwnd(), NULL, NULL);
DWORD nId;
if(!CreateThread(NULL, 0, TimeOutThreadProc, GetSafeHwnd(), NULL, &nId)) {
show_message("Error setting timer, BOINC cannot run", "low");
}
}
//////////
@ -1455,6 +1456,9 @@ int CMainWindow::OnCreate(LPCREATESTRUCT lpcs)
// Check what (if any) activities should be logged
read_log_flags();
LoadUserSettings();
LoadListControls();
LPSTR command_line;
char* argv[100];
int argc;
@ -1491,9 +1495,6 @@ int CMainWindow::OnCreate(LPCREATESTRUCT lpcs)
}
}
LoadUserSettings();
LoadListControls();
CMenu* ConMenu = NULL;
ConMenu = m_MainMenu.GetSubMenu(2);
if(ConMenu) {