当前位置: 首页>>代码示例>>C++>>正文


C++ SetStartTime函数代码示例

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


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

示例1: SetWinner

// this method is called when no players remains in battleground
void BattleGround::Reset()
{
    SetWinner(TEAM_NONE);
    SetStatus(STATUS_WAIT_QUEUE);
    SetStartTime(0);
    SetEndTime(0);

    m_Events = 0;

    // door-event2 is always 0
    m_ActiveEvents[BG_EVENT_DOOR] = 0;

    if (m_InvitedAlliance > 0 || m_InvitedHorde > 0)
        sLog.outError("BattleGround system: bad counter, m_InvitedAlliance: %d, m_InvitedHorde: %d", m_InvitedAlliance, m_InvitedHorde);

    m_InvitedAlliance = 0;
    m_InvitedHorde = 0;
    m_InBGFreeSlotQueue = false;

    m_Players.clear();

    for (BattleGroundScoreMap::const_iterator itr = m_PlayerScores.begin(); itr != m_PlayerScores.end(); ++itr)
        delete itr->second;
    m_PlayerScores.clear();
}
开发者ID:MonstermoshCOM,项目名称:server,代码行数:26,代码来源:BattleGround.cpp

示例2: xmain

int xmain(int argc, char **argv)
	{
    MuscleContext *ctx = getMuscleContext();
#if	WIN32
// Multi-tasking does not work well in CPU-bound
// console apps running under Win32.
// Reducing the process priority allows GUI apps
// to run responsively in parallel.
	SetPriorityClass(GetCurrentProcess(), BELOW_NORMAL_PRIORITY_CLASS);
#endif
	ctx->muscle.g_argc = argc;
	ctx->muscle.g_argv = argv;

	SetNewHandler();
	SetStartTime();
	ProcessArgVect(argc - 1, argv + 1);
	SetParams();
	SetLogFile();

	//extern void TestSubFams(const char *);
	//TestSubFams(g_pstrInFileName);
	//return 0;

	if (ctx->params.g_bVersion)
		{
		printf(MUSCLE_LONG_VERSION "\n");
		exit(EXIT_SUCCESS);
		}

	if (!ctx->params.g_bQuiet)
		//Credits();

	if (MissingCommand() && isatty(0))
		{
		Usage();
		exit(EXIT_SUCCESS);
		}

	if (ctx->params.g_bCatchExceptions)
		{
		try
			{
			Run();
			}
		catch (...)
			{
			OnException();
			exit(EXIT_Except);
			}
		}
	else
		Run();

#ifdef _CRTDBG_MAP_ALLOC
    delete ctx;
    _CrtDumpMemoryLeaks(); //to Output window of MSVC
#endif

	exit(EXIT_Success);
	}
开发者ID:ggrekhov,项目名称:ugene,代码行数:60,代码来源:main.cpp

示例3: DoMakeTree

void DoMakeTree()
	{
	if (g_pstrInFileName.get() == 0 || g_pstrOutFileName.get() == 0)
		Quit("-maketree requires -in <msa> and -out <treefile>");

	SetStartTime();

	SetSeqWeightMethod(g_SeqWeight1.get());

	TextFile MSAFile(g_pstrInFileName.get());

	MSA msa;
	msa.FromFile(MSAFile);

	unsigned uSeqCount = msa.GetSeqCount();
	MSA::SetIdCount(uSeqCount);

// Initialize sequence ids.
// From this point on, ids must somehow propogate from here.
	for (unsigned uSeqIndex = 0; uSeqIndex < uSeqCount; ++uSeqIndex)
		msa.SetSeqId(uSeqIndex, uSeqIndex);
	SetMuscleInputMSA(msa);

	Progress("%u sequences", uSeqCount);

	Tree tree;
	TreeFromMSA(msa, tree, g_Cluster2.get(), g_Distance2.get(), g_Root2.get());

	TextFile TreeFile(g_pstrOutFileName.get(), true);
	tree.ToFile(TreeFile);

	Progress("Tree created");
	}
开发者ID:Wyss,项目名称:mauve-py,代码行数:33,代码来源:maketree.cpp

示例4: SetStartTime

void FCurveSequence::PlayReverse( const float StartAtTime )
{
	bInReverse = true;

	// We start reversing NOW.
	SetStartTime(FSlateApplicationBase::Get().GetCurrentTime() - StartAtTime);
}
开发者ID:amyvmiwei,项目名称:UnrealEngine4,代码行数:7,代码来源:CurveSequence.cpp

示例5: SetStartTime

void BattleGround::StartBattleGround()
{
    ///this method should spawn spirit guides and so on
    SetStartTime(0);

    SetLastResurrectTime(0);
}
开发者ID:yunishaa,项目名称:mangos-112,代码行数:7,代码来源:BattleGround.cpp

示例6: SetStartTime

void BattleGroundSA::ResetBattle(uint32 winner, Team teamDefending)
{
    Phase = SA_ROUND_TWO;
    shipsTimer = BG_SA_BOAT_START;
    shipsStarted = false;

    for (int32 i = 0; i < BG_SA_GATE_MAX; ++i)
        GateStatus[i] = BG_SA_GO_GATES_NORMAL;

    SetStartTime(0);
    defender = (teamDefending  == ALLIANCE) ?  HORDE : ALLIANCE;
    relicGateDestroyed = false;
    ToggleTimer();

    SetupShips();

    for (BattleGroundPlayerMap::const_iterator itr = GetPlayers().begin(); itr != GetPlayers().end(); ++itr)
    {
        Player *plr = sObjectMgr.GetPlayer(itr->first);

        if (!plr)
            continue;

        TeleportPlayerToCorrectLoc(plr, true);

        if (plr->GetBGTeam() == defender && plr->GetItemByEntry(39213) != NULL)
            plr->DestroyItemCount(39213, 1, true);
    }

    UpdatePhase();
    ResetWorldStates();
}
开发者ID:Sar777,项目名称:mangos,代码行数:32,代码来源:BattleGroundSA.cpp

示例7: WXUNUSED

void ContrastDialog::OnGetBackgroundDB( wxCommandEvent & WXUNUSED(event))
{
   SetStartTime(mBackgroundStartT->GetTimeValue());
   SetEndTime(mBackgroundEndT->GetTimeValue());
   backgrounddB = GetDB();
   m_pButton_UseCurrentB->SetFocus();
   results();
}
开发者ID:JordanGraves,项目名称:TabMagic,代码行数:8,代码来源:Contrast.cpp

示例8: SetStartTime

void ContrastDialog::OnGetForegroundDB( wxCommandEvent &event )
{
   SetStartTime(mForegroundStartT->GetTimeValue());
   SetEndTime(mForegroundEndT->GetTimeValue());
   foregrounddB = GetDB();
   m_pButton_UseCurrentF->SetFocus();
   results();
}
开发者ID:ruthmagnus,项目名称:audacity,代码行数:8,代码来源:Contrast.cpp

示例9: SetStartTime

BOOL CObjectCommand_Action::Init(UINT uStartTime, INT nLogicCount, INT nActionID)
{
	SetStartTime(uStartTime);
	SetLogicCount(nLogicCount);
	m_nActionID		= INVALID_ID;

	SetCommandID(OBJECT_COMMAND_ACTION);
	return TRUE;
}
开发者ID:brock7,项目名称:TianLong,代码行数:9,代码来源:ObjectCommand.cpp

示例10: Run

void Run()
	{
	SetStartTime();
	Log("Started %s\n", GetTimeAsStr());
	for (int i = 0; i < g_argc; ++i)
		Log("%s ", g_argv[i]);
	Log("\n");

#if	TIMING
	TICKS t1 = GetClockTicks();
#endif
	if (g_bRefine)
		Refine();
	else if (g_bRefineW)
		{
		extern void DoRefineW();
		DoRefineW();
		}
	else if (g_bProfDB)
		ProfDB();
	else if (g_bSW)
		Local();
	else if (0 != g_pstrSPFileName)
		DoSP();
	else if (g_bProfile)
		Profile();
	else if (g_bPPScore)
		PPScore();
	else if (g_bPAS)
		ProgAlignSubFams();
	else
		DoMuscle();

#if	TIMING
	extern TICKS g_ticksDP;
	extern TICKS g_ticksObjScore;
	TICKS t2 = GetClockTicks();
	TICKS TotalTicks = t2 - t1;
	TICKS ticksOther = TotalTicks - g_ticksDP - g_ticksObjScore;
	double dSecs = TicksToSecs(TotalTicks);
	double PctDP = (double) g_ticksDP*100.0/(double) TotalTicks;
	double PctOS = (double) g_ticksObjScore*100.0/(double) TotalTicks;
	double PctOther = (double) ticksOther*100.0/(double) TotalTicks;
	Log("                 Ticks     Secs    Pct\n");
	Log("          ============  =======  =====\n");
	Log("DP        %12ld  %7.2f  %5.1f%%\n",
	  (long) g_ticksDP, TicksToSecs(g_ticksDP), PctDP);
	Log("OS        %12ld  %7.2f  %5.1f%%\n",
	  (long) g_ticksObjScore, TicksToSecs(g_ticksObjScore), PctOS);
	Log("Other     %12ld  %7.2f  %5.1f%%\n",
	  (long) ticksOther, TicksToSecs(ticksOther), PctOther);
	Log("Total     %12ld  %7.2f  100.0%%\n", (long) TotalTicks, dSecs);
#endif

	ListDiagSavings();
	Log("Finished %s\n", GetTimeAsStr());
	}
开发者ID:yathit,项目名称:molecular-biology-software,代码行数:57,代码来源:domuscle.cpp

示例11: RegisterActiveTimerIfNeeded

void FCurveSequence::PlayReverse( const TSharedRef<SWidget>& InOwnerWidget, bool bPlayLooped, const float StartAtTime )
{
	RegisterActiveTimerIfNeeded(InOwnerWidget);
	bIsLooping = bPlayLooped;
	bIsPaused = false;

	bInReverse = true;

	// We start reversing NOW.
	SetStartTime(FSlateApplicationBase::Get().GetCurrentTime() - StartAtTime);
}
开发者ID:amyvmiwei,项目名称:UnrealEngine4,代码行数:11,代码来源:CurveSequence.cpp

示例12: SetStartTime

void BattleGround::StartBattleGround()
{
    SetStartTime(0);

    // add BG to free slot queue
    AddToBGFreeSlotQueue();

    // add bg to update list
    // This must be done here, because we need to have already invited some players when first BG::Update() method is executed
    // and it doesn't matter if we call StartBattleGround() more times, because m_BattleGrounds is a map and instance id never changes
    sBattleGroundMgr.AddBattleGround(GetInstanceID(), GetTypeID(), this);
}
开发者ID:MonstermoshCOM,项目名称:server,代码行数:12,代码来源:BattleGround.cpp

示例13: SetStartAndEndBytes

//-----------------------------------------------------------------------------
// Purpose: 
// Input  : *phoneme - 
//-----------------------------------------------------------------------------
CPhonemeTag::CPhonemeTag( const char *phoneme )
{
	SetStartAndEndBytes( 0, 0 );

	SetStartTime( 0.0f );
	SetEndTime( 0.0f );

	SetSelected( false );

	SetPhonemeCode( 0 );

	m_szPhoneme = NULL;
	SetTag( phoneme );
}
开发者ID:Adidasman1,项目名称:source-sdk-2013,代码行数:18,代码来源:sentence.cpp

示例14: ctx

MuscleParamsHelper::MuscleParamsHelper(TaskStateInfo& ti, MuscleContext *_ctx)
: ctx(_ctx), ugeneFileStub(ti)
{
    SetParams();

    //override some params. TODO: recheck possible conflict with SetPPScore() !
    ctx->progressPercent = &ti.progress;
    ctx->cancelFlag = &ti.cancelFlag;
    ctx->progress.g_fProgress = &ugeneFileStub; //log context
    ctx->progress.pr_printf = ugene_printf; //overriding logging
    ctx->params.g_uMaxMB = 0; //unlimited memory

    SetMaxIters(ctx->params.g_uMaxIters);
    SetStartTime();
}
开发者ID:ggrekhov,项目名称:ugene,代码行数:15,代码来源:MuscleUtils.cpp

示例15: SetStartTime

bool
Instance::Move(short chan_id, const Time &t, const Time &d, bool display)
{
	if (startTime != t) {
		SetStartTime(t, display);
	}
	if (duration != d) {
		SetDuration(d, display);
	}
	if (chan_id >= 0 && chan_id < uberQua->nChannel) {
		Channel	*c = uberQua->channel[chan_id];
		SetChannel(c, display);
	}
	return true;
}
开发者ID:dakyri,项目名称:qua,代码行数:15,代码来源:Instance.cpp


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