您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ wxTimeSpan函数代码示例

51自学网 2021-06-03 10:12:30
  C++
这篇教程C++ wxTimeSpan函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中wxTimeSpan函数的典型用法代码示例。如果您正苦于以下问题:C++ wxTimeSpan函数的具体用法?C++ wxTimeSpan怎么用?C++ wxTimeSpan使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了wxTimeSpan函数的28个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: sizeof

const wxTimeSpan IdleDetector::GetIdleTime(){#ifdef WIN32	LASTINPUTINFO   info;	info.cbSize = sizeof(info);	if (::GetLastInputInfo (&info))	{		long timeIdle = ::GetTickCount() - info.dwTime;		// Handle overflow		if (timeIdle < 0)			timeIdle = timeIdle + UINT_MAX + 1;		return wxTimeSpan(0, 0, 0, timeIdle);	}#else	if( screen_info == NULL ) {		screen_info = XScreenSaverAllocInfo();		display = XOpenDisplay(0);	}	XScreenSaverQueryInfo(display, DefaultRootWindow(display), screen_info);	return wxTimeSpan( 0, 0, 0, screen_info->idle );#endif	return wxTimeSpan ();}
开发者ID:alexcb,项目名称:tracker,代码行数:25,


示例2: wxDateTime

void CGarbageCollector::RecycleTaskInstances(){    BSLERRCODE rc;    std::vector<CTaskInstance*> oTaskInstances;    std::vector<CTaskInstance*>::iterator iter;    CTaskInstance* pTaskInstance = NULL;    CRPCProfile* pRPCProfile = NULL;    CSyncProfile* pSyncProfile = NULL;    wxDateTime dtExpirationDate = wxDateTime((time_t)0);    wxDateTime dtRPCCompletedDate = wxDateTime((time_t)0);    wxUint32 uiInterval = 0;    rc = m_pHost->FindSyncProfile(CBSLClient::AutoSyncPropertyTaskInstancesUpdateInterval, &pSyncProfile);    if (BSLERR_SUCCESS != rc) return;    if (!pSyncProfile) return;    rc = m_pHost->FindRPCProfile(CLASSINFO(CRPCSyncTaskInstances)->GetClassName(), &pRPCProfile);    if (BSLERR_SUCCESS != rc) return;    if (!pRPCProfile) return;    uiInterval = pSyncProfile->GetValue();    if (!uiInterval) return;    dtRPCCompletedDate = pRPCProfile->GetLastRequestTime() + pRPCProfile->GetTotalDuration();    rc = m_pHost->EnumerateTaskInstances(oTaskInstances);    if (BSLERR_SUCCESS != rc) return;    for (iter = oTaskInstances.begin(); iter != oTaskInstances.end(); ++iter)    {        pTaskInstance = *iter;        // An item is deemed expired if it wasn't refreshed the last time the synchronize        // RPC was called.        //        dtExpirationDate =            pTaskInstance->GetLastModifiedTime() +            wxTimeSpan(0, 0, uiInterval, 0) +            wxTimeSpan(0, 0, 0, 250);        if ((m_dtNow > dtExpirationDate) && (dtRPCCompletedDate > dtExpirationDate))        {            wxLogTrace(wxT("Function Status"),                wxT("CGarbageCollector::RecycleTaskInstances - Recycle '%p', dtNow: '%s', dtExpirationDate: '%s', dtRPCCompletedDate: '%s'"),                pTaskInstance,                m_dtNow.Format(wxT("%H:%M:%S.%l")).c_str(),                dtRPCCompletedDate.Format(wxT("%H:%M:%S.%l")).c_str(),                dtExpirationDate.Format(wxT("%H:%M:%S.%l")).c_str()            );            m_pHost->DeleteTaskInstance(pTaskInstance);        }    }}
开发者ID:romw,项目名称:boincsentinels,代码行数:54,


示例3: wxTimeSpan

wxTimeSpan CControlSocket::GetTimezoneOffset(){	if (!m_pCurrentServer)		return wxTimeSpan();	int seconds = 0;	if (CServerCapabilities::GetCapability(*m_pCurrentServer, timezone_offset, &seconds) != yes)		return wxTimeSpan();	return wxTimeSpan(0, 0, seconds);}
开发者ID:bugiii,项目名称:filezilla3ex,代码行数:11,


示例4: ElapsedTimeToStr

wxString ElapsedTimeToStr(wxLongLong msec){	wxTimeSpan tsMsec(0, 0, 0, msec);	int days = tsMsec.GetDays();	int hours = (wxTimeSpan(tsMsec.GetHours(), 0, 0, 0) - wxTimeSpan(days * 24)).GetHours();	int minutes = (wxTimeSpan(0, tsMsec.GetMinutes(), 0, 0) - wxTimeSpan(hours)).GetMinutes();	long seconds = (wxTimeSpan(0, 0, tsMsec.GetSeconds(), 0) - wxTimeSpan(0, minutes)).GetSeconds().ToLong();	long milliseconds = (wxTimeSpan(0, 0, 0, tsMsec.GetMilliseconds()) - wxTimeSpan(0, 0, seconds)).GetMilliseconds().ToLong();	if (days > 0)		return wxString::Format(		           wxT("%d %s, %02d:%02d:%02ld hours"),		           days, wxT("days"), hours, minutes, seconds		       );	else if (hours > 0)		return wxString::Format(		           wxT("%02d:%02d:%02ld hours"), hours, minutes, seconds		       );	else if (msec >= 1000 * 60)		return wxString::Format(wxT("%02d:%02ld minutes"), minutes, seconds);	else if (msec >= 1000)		return wxString::Format(		           wxT("%ld.%ld secs"), seconds, milliseconds / 100		       );	else		return msec.ToString() + wxT(" msec");}
开发者ID:swflb,项目名称:pgadmin3,代码行数:28,


示例5: fn

void FileNameTestCase::TestGetTimes(){    wxFileName fn(wxFileName::CreateTempFileName("filenametest"));    CPPUNIT_ASSERT( fn.IsOk() );    wxON_BLOCK_EXIT1( wxRemoveFile, fn.GetFullPath() );    wxDateTime dtAccess, dtMod, dtCreate;    CPPUNIT_ASSERT( fn.GetTimes(&dtAccess, &dtMod, &dtCreate) );    // make sure all retrieved dates are equal to the current date&time     // with an accuracy up to 1 minute    CPPUNIT_ASSERT(dtCreate.IsEqualUpTo(wxDateTime::Now(), wxTimeSpan(0,1)));    CPPUNIT_ASSERT(dtMod.IsEqualUpTo(wxDateTime::Now(), wxTimeSpan(0,1)));    CPPUNIT_ASSERT(dtAccess.IsEqualUpTo(wxDateTime::Now(), wxTimeSpan(0,1)));}
开发者ID:slunski,项目名称:wxWidgets,代码行数:15,


示例6: switch

wxString BattleListCtrl::GetItemText(long item, long column) const{    if ( m_data[item] == NULL )        return wxEmptyString;    const IBattle& battle= *m_data[item];    const BattleOptions& opts = battle.GetBattleOptions();    switch ( column ) {        case 0:        case 1:        case 2:        default: return wxEmptyString;        case 3: return ( opts.description );		case 4: return ( battle.GetHostMapName() );		case 5: return ( battle.GetHostModName() );        case 6: return ( opts.founder );		case 7: return wxFormat(_T("%d") ) % int(battle.GetSpectators());		case 8: return wxFormat(_T("%d") ) % (int(battle.GetNumUsers()) - int(battle.GetSpectators()));		case 9: return wxFormat(_T("%d") ) % int(battle.GetMaxPlayers());        case 10: return ( wxTimeSpan(0/*h*/,0/*m*/,                                     battle.GetBattleRunningTime()).Format(_T("%H:%M")) );		case 11: return battle.GetEngineVersion();    }}
开发者ID:tulipe7,项目名称:springlobby,代码行数:26,


示例7: wxGetApp

UserSettings::UserSettings() {  IconSize = wxGetApp().GetOSValidIconSize(LARGE_ICON_SIZE);  Locale = _T("en");  PortableAppsPath = _T("$(Drive)/PortableApps");  DocumentsPath = _T("$(Drive)/Documents");  MusicPath = _T("$(Drive)/Documents/Music");  PicturesPath = _T("$(Drive)/Documents/Pictures");  VideosPath = _T("$(Drive)/Documents/Videos");  Skin = _T("Default");  Rotated = false;  AlwaysOnTop = false;  MinimizeOnClose = true;  UniqueApplicationInstance = true;  AutoHideApplication = false;  RunMultiLaunchOnStartUp = false;  CloseAppsOnEject = false;  HotKeyControl = false;  HotKeyAlt = false;  HotKeyShift = false;  HotKeyKey = 0;  ShowDeleteIconMessage = true;  ShowEjectDriveMessage = true;  ShowMinimizeMessage = true;  NextUpdateCheckTime = wxDateTime::Now();  // This is just to force an update check the first time the   // app is launched.  NextUpdateCheckTime.Subtract(wxTimeSpan(24));}
开发者ID:tanaga9,项目名称:appetizer,代码行数:30,


示例8: SetOwner

void IdleDetector::Start (wxEvtHandler* owner, const wxTimeSpan& timeout){	SetOwner (owner);	m_timeout = timeout;	m_isIdle = false;	SetState (false, wxTimeSpan());}
开发者ID:alexcb,项目名称:tracker,代码行数:7,


示例9: TIME_ASSERT

bool CDateTime::ImbueTime( int hour, int minute, int second, int millisecond ){	if( !IsValid() || a_ > days ) {		return false;	}	if( second == -1 ) {		a_ = minutes;		TIME_ASSERT(millisecond == -1);		second = millisecond = 0;	}	else if( millisecond == -1 ) {		a_ = seconds;		millisecond = 0;	}	else {		a_ = milliseconds;	}	if( hour < 0 || hour >= 24 ) {		return false;	}	if( minute < 0 || minute >= 60 ) {		return false;	}	if( second < 0 || second >= 60 ) {		return false;	}	if( millisecond < 0 || millisecond >= 1000 ) {		return false;	}	t_ += wxTimeSpan(hour, minute, second, millisecond);	return true;}
开发者ID:Typz,项目名称:FileZilla,代码行数:35,


示例10: wxTimeSpan

void PlotDialog::OnMouseEventsPlot( wxMouseEvent& event ){    wxStaticText *stMousePosition[3] = {m_stMousePosition1, m_stMousePosition2, m_stMousePosition3};    if(event.Leaving()) {        for(int i=0; i<3; i++)            stMousePosition[i]->SetLabel(_("N/A"));        return;    }    int w, h;    m_PlotWindow->GetSize( &w, &h);    wxPoint p = event.GetPosition();#if 0    double position = m_sPosition->GetValue() / 100.0;    double scale = 100.0 / m_sScale->GetValue();    double time = (((double)p.x/w - position) / scale + position) * (m_maxtime - m_mintime) + m_mintime;    wxDateTime datetime = m_StartTime + wxTimeSpan(0, 0, time);#endif    for(int i=0; i<3; i++) {        double value = (1.0 - (double)p.y / h) * (m_maxvalue - m_minvalue) + m_minvalue;        stMousePosition[i]->SetLabel(wxString::Format(_T(" %.3f"), value));    }}
开发者ID:Rasbats,项目名称:OpenCPN.3.3.1117_weather_routing,代码行数:27,


示例11: MinTime

wxDateTime GRIBUIDialog::TimelineTime(){    int tl = (m_TimeLineHours == 0) ? 0 : m_sTimeline->GetValue();    int hours = tl/m_OverlaySettings.m_HourDivider;    int minutes = (tl%m_OverlaySettings.m_HourDivider)*60/m_OverlaySettings.m_HourDivider;    return MinTime() + wxTimeSpan(hours, minutes);}
开发者ID:IgorMikhal,项目名称:OpenCPN,代码行数:7,


示例12: WXCTimer

void WXCJob::Start (){    wxDateTime dtNextExec;    // old timer there?    if (pTimer_)        pTimer_->Stop();    else        pTimer_ = new WXCTimer(this);    // get last execution    wxDateTime dtLastExec = WXCTimestampFile::Instance().GetLast(GetOriginalLine());    // there is a last execution timestamp    if ( dtLastExec.IsValid() )    {        // last execution in the past        if ( dtLastExec <= wxDateTime::Now() )        {            // catchup ?            if ( !bOption_nocatchup_ )            {                // catch up the job                if ( time_.GetNext(dtLastExec) < wxDateTime::Now() )                {                    Execute();                    return;                }                else                {                    dtNextExec = time_.GetNext(dtLastExec);                }            }            else            {                dtNextExec = time_.GetNext();            }        }        else        // its in the future        {            dtNextExec = dtLastExec;        }    }	// the job wasn't started before    if ( !(dtNextExec.IsValid()) )		dtNextExec = wxDateTime::Now() + wxTimeSpan(0, 0, 15);    // start the timer    pTimer_->Start(dtNextExec);    // remember timestamp for future execution    if ( !(dtLastExec.IsValid()) )    {        WXCTimestampFile::Instance().Set(GetOriginalLine(), dtNextExec);        WXCTimestampFile::Instance().Save();    }}
开发者ID:BackupTheBerlios,项目名称:wxcron-svn,代码行数:59,


示例13: WXUNUSED

void TimerRecordDialog::OnTimeText_Duration(wxCommandEvent& WXUNUSED(event)){   double dTime = m_pTimeTextCtrl_Duration->GetTimeValue();   long hr = (long)(dTime / 3600.0);   long min = (long)((dTime - (hr * 3600.0)) / 60.0);   long sec = (long)(dTime - (hr * 3600.0) - (min * 60.0));   m_TimeSpan_Duration = wxTimeSpan(hr, min, sec); //v milliseconds?   this->UpdateEnd(); // Keep Start constant and update End for changed Duration.}
开发者ID:Cactuslegs,项目名称:audacity-of-nope,代码行数:10,


示例14: TToString

//date/time in the desired time zone formatstatic wxString TToString( const wxDateTime date_time, const int time_zone ){      wxDateTime t( date_time );    t.MakeFromTimezone( wxDateTime::UTC );    if( t.IsDST() ) t.Subtract( wxTimeSpan( 1, 0, 0, 0 ) );    switch( time_zone ) {        case 0: return t.Format( _T(" %a %d-%b-%Y  %H:%M "), wxDateTime::Local ) + _T("LOC");//:%S        case 1:         default: return t.Format( _T(" %a %d-%b-%Y %H:%M  "), wxDateTime::UTC ) + _T("UTC");    }}
开发者ID:IgorMikhal,项目名称:OpenCPN,代码行数:12,


示例15: wxAtoi

void wxGPProcess::ProcessInput(wxString sInputData){	if(m_nState != enumGISTaskWork)        return;    sInputData = sInputData.Trim(true).Trim(false);//INFO, DONE, ERR, ??	wxString sRest;	if( sInputData.StartsWith(wxT("DONE: "), &sRest) )	{		int nPercent = wxAtoi(sRest.Trim(true).Trim(false).Truncate(sRest.Len() - 1));		wxTimeSpan Elapsed = wxDateTime::Now() - m_dtBeg;//time left        wxString sTxt;		if(m_pProgressor)			m_pProgressor->SetValue(nPercent);        double nPercentR = 100 - nPercent;		if(nPercentR >= 0)		{			//wxTimeSpan Remains = Elapsed * (nPercentR / nPercent);			long dMSec = double(Elapsed.GetMilliseconds().ToDouble() * nPercentR) / nPercent;			wxTimeSpan Remains = wxTimeSpan(0,0,0,dMSec);			m_dtEstEnd = wxDateTime::Now() + Remains;			sTxt = wxString(_("Remains ")) + Remains.Format(_("%H hour(s) %M min. %S sec."));		}		if(m_pTrackCancel && !sTxt.IsEmpty())			m_pTrackCancel->PutMessage(sTxt, -1, enumGISMessageTitle);		return;	}	if( sInputData.StartsWith(wxT("INFO: "), &sRest) )	{		if(m_pTrackCancel)			m_pTrackCancel->PutMessage(sRest, -1, enumGISMessageNorm);		return;	}	if( sInputData.StartsWith(wxT("ERR: "), &sRest) )	{		if(m_pTrackCancel)			m_pTrackCancel->PutMessage(sRest, -1, enumGISMessageErr);		return;	}	if( sInputData.StartsWith(wxT("WARN: "), &sRest) )	{		if(m_pTrackCancel)			m_pTrackCancel->PutMessage(sRest, -1, enumGISMessageWarning);		return;	}    else	{		if(m_pTrackCancel)			m_pTrackCancel->PutMessage(sInputData, -1, enumGISMessageInfo);		return;	}}
开发者ID:GimpoByte,项目名称:nextgismanager,代码行数:54,


示例16: wxTimeSpan

void WeatherRouting::StartAll(){    m_StatisticsDialog.SetRunTime(m_RunTime = wxTimeSpan(0));    for(int i=0; i<m_lWeatherRoutes->GetItemCount(); i++)    {        RouteMapOverlay *routemapoverlay =            reinterpret_cast<WeatherRoute*>(wxUIntToPtr(m_lWeatherRoutes->GetItemData(i)))->routemapoverlay;        Start(routemapoverlay);    }}
开发者ID:CarCode,项目名称:Cocoa-OCPN,代码行数:11,


示例17: switch

void MyListModel::GetValueByRow( wxVariant &variant,                                 unsigned int row, unsigned int col ) const{    switch ( col )    {        case Col_EditableText:            if (row >= m_textColValues.GetCount())                variant = wxString::Format( "virtual row %d", row );            else                variant = m_textColValues[ row ];            break;        case Col_IconText:            {                wxString text;                if ( row >= m_iconColValues.GetCount() )                    text = "virtual icon";                else                    text = m_iconColValues[row];                variant << wxDataViewIconText(text, m_icon[row % 2]);            }            break;        case Col_Date:            variant = wxDateTime(1, wxDateTime::Jan, 2000).Add(wxTimeSpan(row));            break;        case Col_TextWithAttr:            {                static const char *labels[5] =                {                    "blue", "green", "red", "bold cyan", "default",                };                variant = labels[row % 5];            }            break;        case Col_Custom:            {                IntToStringMap::const_iterator it = m_customColValues.find(row);                if ( it != m_customColValues.end() )                    variant = it->second;                else                    variant = wxString::Format("%d", row % 100);            }            break;        case Col_Max:            wxFAIL_MSG( "invalid column" );    }}
开发者ID:EmptyChaos,项目名称:wxWidgets,代码行数:53,


示例18: wxAtof

void wxGISProcess::UpdatePercent(const wxString &sPercentData){	m_dfDone = wxAtof(sPercentData);	wxTimeSpan Elapsed = wxDateTime::Now() - m_dtBeg;//time left    wxString sTxt;    double nPercentR = 100.0 - m_dfDone;	if(nPercentR >= 0.0 && m_dfDone > 0.0)	{		long dMSec = double(Elapsed.GetMilliseconds().ToDouble() * nPercentR) / m_dfDone;		wxTimeSpan Remains = wxTimeSpan(0,0,0,dMSec);		m_dtEstEnd = wxDateTime::Now() + Remains;	}}
开发者ID:Mileslee,项目名称:wxgis,代码行数:14,


示例19: GetDownloadSpeed

wxTimeSpan wxDownloadEvent::GetEstimatedTime() const{    wxULongLong nBytesPerSec = GetDownloadSpeed();    if (nBytesPerSec == 0)        return 0;       // avoid division by zero    // compute remaining seconds; here we assume that the current    // download speed will be constant also in future    double secs = m_total.ToDouble() / nBytesPerSec.ToDouble();    return wxTimeSpan(0,        // hours                      0,        // minutes                      (wxLongLong_t)secs,     // seconds                      0);       // milliseconds}
开发者ID:stahta01,项目名称:wxCode_components,代码行数:15,


示例20: wxTimeSpan

wxInt32 CViewTransfers::FormatTime(double fBuffer, wxString& strBuffer) const {    wxInt32        iHour = 0;    wxInt32        iMin = 0;    wxInt32        iSec = 0;    wxTimeSpan     ts;    iHour = (wxInt32)(fBuffer / (60 * 60));    iMin  = (wxInt32)(fBuffer / 60) % 60;    iSec  = (wxInt32)(fBuffer) % 60;    ts = wxTimeSpan(iHour, iMin, iSec);    strBuffer = ts.Format();    return 0;}
开发者ID:niclaslockner,项目名称:boinc,代码行数:16,


示例21: columns

ProgressResult TimerRecordDialog::PreActionDelay(int iActionIndex, TimerRecordCompletedActions eCompletedActions){   wxString sAction = m_pTimerAfterCompleteChoiceCtrl->GetString(iActionIndex);   wxString sCountdownLabel;   sCountdownLabel.Printf("%s in:", sAction);   // Two column layout.   TimerProgressDialog::MessageTable columns(2);   auto &column1 = columns[0];   auto &column2 = columns[1];   column1.push_back(_("Timer Recording completed."));   column2.push_back( {} );   column1.push_back( {} );   column2.push_back( {} );   column1.push_back(_("Recording Saved:"));   column2.push_back(((eCompletedActions & TR_ACTION_SAVED) ? _("Yes") : _("No")));   column1.push_back(_("Recording Exported:"));   column2.push_back(((eCompletedActions & TR_ACTION_EXPORTED) ? _("Yes") : _("No")));   column1.push_back(_("Action after Timer Recording:"));   column2.push_back(sAction);   wxDateTime dtNow = wxDateTime::UNow();   wxTimeSpan tsWait = wxTimeSpan(0, 1, 0, 0);   wxDateTime dtActionTime = dtNow.Add(tsWait);   TimerProgressDialog dlgAction(tsWait.GetMilliseconds().GetValue(),                          _("Audacity Timer Record - Waiting"),                          columns,                          pdlgHideStopButton | pdlgHideElapsedTime,                          sCountdownLabel);   auto iUpdateResult = ProgressResult::Success;   bool bIsTime = false;   while (iUpdateResult == ProgressResult::Success && !bIsTime)   {      iUpdateResult = dlgAction.UpdateProgress();      wxMilliSleep(10);      bIsTime = (dtActionTime <= wxDateTime::UNow());   }   return iUpdateResult;}
开发者ID:MindFy,项目名称:audacity,代码行数:46,


示例22: wxT

wxString CSimpleTaskPanel::FormatTime(float fBuffer) {    wxInt32        iHour = 0;    wxInt32        iMin = 0;    wxInt32        iSec = 0;    wxTimeSpan     ts;    wxString strBuffer= wxEmptyString;    if (0 >= fBuffer) {        strBuffer = wxT("---");    } else {        iHour = (wxInt32)(fBuffer / (60 * 60));        iMin  = (wxInt32)(fBuffer / 60) % 60;        iSec  = (wxInt32)(fBuffer) % 60;        ts = wxTimeSpan(iHour, iMin, iSec);        strBuffer = ts.Format();    }    return strBuffer;}
开发者ID:Milkyway-at-home,项目名称:BOINC,代码行数:20,


示例23: wxT

wxInt32 CViewWork::FormatCPUTime(float fBuffer, wxString& strBuffer) const {    wxInt32        iHour = 0;    wxInt32        iMin = 0;    wxInt32        iSec = 0;    wxTimeSpan     ts;        if (0 == fBuffer) {        strBuffer = wxT("---");    } else {        iHour = (wxInt32)(fBuffer / (60 * 60));        iMin  = (wxInt32)(fBuffer / 60) % 60;        iSec  = (wxInt32)(fBuffer) % 60;        ts = wxTimeSpan(iHour, iMin, iSec);        strBuffer = ts.Format();    }    return 0;}
开发者ID:Milkyway-at-home,项目名称:BOINC,代码行数:20,


示例24: GetTextTime

void wxTimeSpinCtrl::OnKillFocus(wxFocusEvent &ev){#ifdef __WXGTK__	ev.Skip();#endif	long time = GetTextTime();	if (time < 0)	{		m_txt->SetValue(wxEmptyString);		spinValue = 0;		m_spn->SetValue(0);	}	else	{		int tp = GetTimePart();		SetValue(wxTimeSpan(0, 0, time));		Highlight(tp);	}}
开发者ID:KrisShannon,项目名称:pgadmin3,代码行数:21,


示例25: wxGetApp

wxInt32 CViewTransfersGrid::FormatTime(wxInt32 item, wxString& strBuffer) const {    float          fBuffer = 0;    wxInt32        iHour = 0;    wxInt32        iMin = 0;    wxInt32        iSec = 0;    wxTimeSpan     ts;    FILE_TRANSFER* transfer = wxGetApp().GetDocument()->file_transfer(item);    if (transfer) {        fBuffer = transfer->time_so_far;    }    iHour = (wxInt32)(fBuffer / (60 * 60));    iMin  = (wxInt32)(fBuffer / 60) % 60;    iSec  = (wxInt32)(fBuffer) % 60;    ts = wxTimeSpan(iHour, iMin, iSec);    strBuffer = wxT(" ") + ts.Format();    return 0;}
开发者ID:Rytiss,项目名称:native-boinc-for-android,代码行数:22,


示例26: t

wxString GRIBTable::GetTimeRowsStrings( wxDateTime date_time, int time_zone, int type ){    wxDateTime t( date_time );    t.MakeFromTimezone( wxDateTime::UTC );    if( t.IsDST() ) t.Subtract( wxTimeSpan( 1, 0, 0, 0 ) );    switch( time_zone ) {        case 0:             switch( type ){            case 0:                return t.Format( _T(" %H:%M  "), wxDateTime::Local ) + _T("LOC");            case 1:                return t.Format( _T(" %a-%d-%b-%Y  "), wxDateTime::Local);            }        case 1:            switch( type ){            case 0:                return t.Format( _T(" %H:%M  "), wxDateTime::UTC ) + _T("UTC");            case 1:                return t.Format( _T(" %a-%d-%b-%Y  "), wxDateTime::UTC );            }        default:            return wxEmptyString;    }}
开发者ID:aaronbradshaw,项目名称:OpenCPN,代码行数:24,


示例27: t

wxString GRIBTable::GetTimeRowsStrings( wxDateTime date_time, int time_zone, int type ){    wxDateTime t( date_time );    switch( time_zone ) {        case 0:			if( (wxDateTime::Now() == (wxDateTime::Now().ToGMT())) && t.IsDST() )  //bug in wxWingets 3.0 for UTC meridien ?				t.Add( wxTimeSpan( 1, 0, 0, 0 ) );            switch( type ){            case 0:                return t.Format( _T(" %H:%M  "), wxDateTime::Local ) + _T("LOC");            case 1:                return t.Format( _T(" %a-%d-%b-%Y  "), wxDateTime::Local);            }        case 1:            switch( type ){            case 0:                return t.Format( _T(" %H:%M  "), wxDateTime::UTC ) + _T("UTC");            case 1:                return t.Format( _T(" %a-%d-%b-%Y  "), wxDateTime::UTC );            }        default:            return wxEmptyString;    }}
开发者ID:NicolasJourden,项目名称:OpenCPN,代码行数:24,


示例28: _

int TimerRecordDialog::PreActionDelay(int iActionIndex, TimerRecordCompletedActions eCompletedActions){   wxString sAction = m_pTimerAfterCompleteChoiceCtrl->GetString(iActionIndex);   wxString sCountdownLabel;   sCountdownLabel.Printf("%s in:", sAction);   // Build a clearer message...   wxString sMessage;   sMessage.Printf(_("Timer Recording Completed./n/n") +      _("Recording Saved:/t/t/t%s/n") +      _("Recording Exported:/t/t%s/n") +      _("Post Timer Recording Action:/t%s"),      ((eCompletedActions & TR_ACTION_SAVED) ? _("Yes") : _("No")),      ((eCompletedActions & TR_ACTION_EXPORTED) ? _("Yes") : _("No")),      sAction);   wxDateTime dtNow = wxDateTime::UNow();   wxTimeSpan tsWait = wxTimeSpan(0, 1, 0, 0);   wxDateTime dtActionTime = dtNow.Add(tsWait);   TimerProgressDialog dlgAction(tsWait.GetMilliseconds().GetValue(),                          _("Audacity Timer Record - Waiting"),                          sMessage,                          pdlgHideStopButton | pdlgHideElapsedTime,                          sCountdownLabel);   int iUpdateResult = eProgressSuccess;   bool bIsTime = false;   while (iUpdateResult == eProgressSuccess && !bIsTime)   {      iUpdateResult = dlgAction.Update();      wxMilliSleep(10);      bIsTime = (dtActionTime <= wxDateTime::UNow());   }   return iUpdateResult;}
开发者ID:MaxKellermann,项目名称:audacity,代码行数:36,



注:本文中的wxTimeSpan函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ wxTimerEventHandler函数代码示例
C++ wxT函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。