Пример #1
0
void TrendReportFrame::Query6MonthText()
{
	m_endTime = TTime::GetCurrentTimeEx();
	if(m_endTime.GetMonth() <= 6)
	{
		TTime tmpTime(m_endTime.GetYear() - 1, 13 - m_endTime.GetMonth(), m_endTime.GetDay(), m_endTime.GetHour(), m_endTime.GetMinute(), m_endTime.GetSecond());
		m_startTime = tmpTime;
	}
	else
	{
		TTime tmpTime(m_endTime.GetYear() , m_endTime.GetMonth() - 6, m_endTime.GetDay(), m_endTime.GetHour(), m_endTime.GetMinute(), m_endTime.GetSecond());
		m_startTime = tmpTime;
	}
	
	m_strMonitorid = m_pTrendReportTree->getSelMonitorID();
	pAlertStartTime->setText(m_startTime.Format());
	pAlertEndTime->setText(m_endTime.Format());

	ChangeTrendReport(m_strMonitorid, m_startTime, m_endTime);	
	WebSession::js_af_up = "hiddenbar()";
}
Пример #2
0
// Sets the maximum time (in milliseconds) that the media processing
// task will wait for a "frame start" signal. A value of -1 indicates
// that the task should wait "forever".
// The new timeout will take effect at the beginning of the next frame
// interval. For now, this method always returns OS_SUCCESS.
OsStatus MpMediaTask::setWaitTimeout(int msecs)
{
   assert(msecs >= -1);

   if (msecs == -1)
      mSemTimeout = OsTime::OS_INFINITY;
   else
   {
      OsTime tmpTime(msecs/1000, (msecs % 1000) * 1000);
      mSemTimeout = tmpTime;
   }

   return OS_SUCCESS;
}
void FileTransferWidget::SetRemainTime()
{
    if(m_speedBytes)
    {
        qint64 progress = 0, totalSize = 0;
        if (m_transferMode == TM_RECIEVE_CLIENT)
        {
            progress = m_currentFileSize;
            totalSize = m_filesHashIter->value();
        }
        else if (m_transferMode == TM_SEND_SERVER)
        {
            progress = m_currentFile.pos();
            totalSize = m_currentFile.size();
        }

        int secsLeft = (totalSize - progress) / m_speedBytes;
        QTime tmpTime(0,0,0);
        m_ui->remainedLabel->setText(tmpTime.addSecs(secsLeft).toString());
    }
}
Пример #4
0
 byte dtsAmPmBuilderEnter(MenuData &data) {
   AFTime tmpTime(hour(), 0, data.getCurrentBool());
   setTime(tmpTime.getHour24(), minute(), 0, weekday(), ArduinoFuoco::AppSettings::SET_TIME_START_MONTH, ArduinoFuoco::AppSettings::SET_TIME_START_YEAR);  // setTime(hr,min,sec,day,month,yr);
   return 7;
 }