Home |
RTKernel-32 Programming Manual Function RTPResult |
Function RTPResultRTPResult retrieves the results gathered in a preceding profiler run: UINT RTPResult(const char * * FileName, UINT * LineNumber, UINT PrevResult); ParametersFileNamePointer to a filename pointer which will receive a pointer to a source file name or a task name. This value is NULL if the function's return value is 0. LineNumberPointer to an unsigned integer to receive a line number, or zero, if the returned counter is a task counter. PrevResultThe value returned from this function the last time it was called. On the first call of RTPResult, zero should be specified. return valueThe number of times the source file line given in *FileName and *Line was counted. This function must be called repeatedly to retrieve all results gathered in a profiler run. RTPResult will return results sorted with the highest count first. Zero counts are not returned. Example:UINT Line; const char * FileName; UINT Result = 0; RTPStop(); while (1) { Result = RTPResult(&FileName, &Line, R); if (Result == 0) break; if (Line) printf("%7i %s.%i\n", Result, FileName, Line) else printf("%7i %s\n", Result, FileName); } A complete example with scaled result display is available in demo program Profdemo.
|