Esempio n. 1
0
void TTiming::parse(QString s_val)
{
    if (s_val == "" || s_val == "indefinite")
        status = s_val;
    else
    {
        if (s_val.mid(0, 9) == "wallclock")
        {
            parseWallclock(s_val.mid(10, s_val.length()-11)); // wallclock(the_interesting stuff)
            status    = "wallclock";
        }
        else // default an unrecognized set to 0 except on excl-element (indefinite). This ist set in TExcl->parse
        {
            ms = calculateMilliseconds(s_val);
            status = "ms";
        }
    }
    return;
}
void StopAndPrintTracer::trace(const char* newName, const char* newDescription)
{
	const volatile uint32_t stopCount = xpcc::cortex::CycleCounter::getCount();
	const xpcc::Timestamp stopTime = xpcc::Clock::now();
	//
	if(firstTrace) {
		firstTrace = false;
	} else {
		cycles = calculateCycles(startCount, stopCount, constant_cycle_offset);
		milliseconds = calculateMilliseconds(startTime, stopTime);
		if(!silent) {
			printTrace(newName, newDescription);
		}
	}
	this->name = newName;
	this->description = newDescription;
	//
	startTime = xpcc::Clock::now();
	startCount = xpcc::cortex::CycleCounter::getCount();
}