tstPrfRT.cpp revision c97989161fbe75bc14cea477a5443bbf474dd3ad
/* $Id$ */
/** @file
* innotek Portable Runtime testcase - profile some of the important functions.
*/
/*
* Copyright (C) 2006-2007 innotek GmbH
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License as published by the Free Software Foundation,
* in version 2 as it comes in the "COPYING" file of the VirtualBox OSE
* distribution. VirtualBox OSE is distributed in the hope that it will
* be useful, but WITHOUT ANY WARRANTY of any kind.
*
* If you received this file as part of a commercial VirtualBox
* distribution, then only the terms of your commercial VirtualBox
* license agreement apply instead of the previous paragraph.
*/
/*******************************************************************************
* Header Files *
*******************************************************************************/
void PrintResult(uint64_t u64Ticks, uint64_t u64MaxTicks, uint64_t u64MinTicks, unsigned cTimes, const char *pszOperation)
{
RTPrintf("tstPrfRT: %-32s %5lld / %5lld / %5lld ticks per call (%u calls %lld ticks)\n",
}
{ \
{ preexpr } \
{ expr } \
{ postexpr } \
{ \
i--; \
continue; \
} \
if (u64ElapsedTS < u64MinTS) \
u64MinTS = u64ElapsedTS; \
if (u64ElapsedTS > u64MaxTS) \
u64MaxTS = u64ElapsedTS; \
u64TotalTS += u64ElapsedTS; \
}
int main()
{
unsigned i;
RTR3Init();
RTPrintf("tstPrfRT: TESTING...\n");
/*
* RTTimeNanoTS, RTTimeProgramNanoTS, RTTimeMilliTS, and RTTimeProgramMilliTS.
*/
/*
* RTTimeNow
*/
/*
* RTLogDefaultInstance()
*/
/*
* RTThreadSelf and RTThreadNativeSelf
*/
RTPrintf("tstPrtRT: DONE\n");
return 0;
}