本文整理汇总了C++中TimeSpan::toStringMilliseconds方法的典型用法代码示例。如果您正苦于以下问题:C++ TimeSpan::toStringMilliseconds方法的具体用法?C++ TimeSpan::toStringMilliseconds怎么用?C++ TimeSpan::toStringMilliseconds使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类TimeSpan
的用法示例。
在下文中一共展示了TimeSpan::toStringMilliseconds方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getPowerLimitTimeWindow
std::string DomainPowerControl_001::createStatusStringForTimeWindow(PowerControlType::Type controlType)
{
try
{
if (isEnabled(controlType) &&
((controlType == PowerControlType::PL1) ||
(controlType == PowerControlType::PL3)))
{
TimeSpan timeWindow = getPowerLimitTimeWindow(getParticipantIndex(), getDomainIndex(), controlType);
return timeWindow.toStringMilliseconds();
}
else
{
return "DISABLED";
}
}
catch (primitive_not_found_in_dsp)
{
return "NOT SUPPORTED";
}
catch (...)
{
return "ERROR";
}
}
示例2: scheduleCallback
void PolicyCallbackScheduler::scheduleCallback(ParticipantRole::Type participantRole, UIntN participantIndex,
const TimeSpan& currentTime, const TimeSpan& pollTime)
{
UInt64 callbackHandle = m_policyServices.policyInitiatedCallback->createPolicyInitiatedDeferredCallback
(participantRole, participantIndex, nullptr, pollTime);
m_schedule[std::make_pair(participantRole, participantIndex)] = ParticipantCallback(pollTime, currentTime, callbackHandle);
m_policyServices.messageLogging->writeMessageDebug(PolicyMessage(FLF,
"Scheduled a callback in " + pollTime.toStringMilliseconds() + " ms" +
" for participant " + StlOverride::to_string(participantIndex) + " with event code = " +
StlOverride::to_string(participantRole) + ".", participantIndex));
}
示例3: getPlatformPowerLimitTimeWindow
std::string DomainPlatformPowerControl_001::createStatusStringForTimeWindow(PlatformPowerLimitType::Type limitType)
{
try
{
if (isEnabled(limitType) &&
((limitType == PlatformPowerLimitType::PSysPL1) ||
(limitType == PlatformPowerLimitType::PSysPL3)))
{
TimeSpan timeWindow = getPlatformPowerLimitTimeWindow(getParticipantIndex(), getDomainIndex(),
limitType);
return timeWindow.toStringMilliseconds();
}
else
{
return "DISABLED";
}
}
catch (...)
{
return "ERROR";
}
}