Example #1
0
std::wstring ProcessInfo::GetProcessInfo(HANDLE handle)
{
	FILETIME creation = { 0 };
	FILETIME exit = { 0 };
	FILETIME kernel = { 0 };
	FILETIME user = { 0 };
	GetProcessTimes(handle, &creation, &exit, &kernel, &user);
	return WStr(GetTimeText(creation)).str();
}
Example #2
0
/** \brief Looks up the time and sets the clock if the current time is
 *         greater than or equal to m_nextUpdate.
 */
void MythUIClock::Pulse(void)
{
    m_Time = QDateTime::currentDateTime();

    if (m_nextUpdate.isNull() || (m_Time >= m_nextUpdate))
        MythUIText::SetText(GetTimeText());

    MythUIText::Pulse();
}
Example #3
0
void OutputDetails(Settings settings, const Line& line)
{
	std::string separator = settings.tabs ? "\t" : " ";
	if (settings.timestamp) 
	{
		std::cout << GetTimeText(line.systemTime) << separator;
	}
	if (settings.performanceCounter) 
	{
		std::cout << GetTimeText(line.time) << separator;
	}
	if (settings.pid) 
	{
		std::cout << line.pid << separator;
	}
	if (settings.processName) 
	{
		std::cout << line.processName.c_str() << separator;
	}
}
Example #4
0
/** \brief This sets the text, unless the string is blank, in that
 *         case the time is looked up and set as the text instead.
 */
void MythUIClock::SetText(const QString &text)
{
    QString txt = text;

    if (txt.isEmpty())
    {
        m_Time = QDateTime::currentDateTime();
        txt = GetTimeText();
    }

    MythUIText::SetText(txt);
}