Ejemplo n.º 1
0
dng_timer::~dng_timer ()
	{

	real64 totalTime = TickTimeInSeconds () - fStartTime;
	
	fprintf (stderr, "%s: %0.3f sec\n", fMessage, totalTime);

	}
Ejemplo n.º 2
0
dng_timer::dng_timer (const char *message)

	:	fMessage   (message             )
	,	fStartTime (TickTimeInSeconds ())
	
	{

	}
Ejemplo n.º 3
0
dng_timer::~dng_timer ()
	{
	
	if (!gDNGShowTimers)
		return;

	real64 totalTime = TickTimeInSeconds () - fStartTime;
	
	fprintf (stderr, "%s: %0.3f sec\n", fMessage, totalTime);

	}
Ejemplo n.º 4
0
real64 TickCountInSeconds ()
	{
	
	#if qWinOS
	
	return GetTickCount () * (1.0 / 1000.0);
	
	#elif qMacOS
	
	return TickCount () * (1.0 / 60.0);
	
	#else
	
	return TickTimeInSeconds ();
	
	#endif
	
	}
real64 TickCountInSeconds ()
	{
	
	#if qWinOS
	
	return GetTickCount () * (1.0 / 1000.0);
	
	#elif qMacOS
	
	#if TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
	// TODO: Needs implementation.
	ThrowProgramError ("TickCountInSeconds() not implemented on iOS");
	return 0;
	#else	
	return TickCount () * (1.0 / 60.0);
	#endif  // TARGET_OS_IPHONE || TARGET_IPHONE_SIMULATOR
	
	#else
	
	return TickTimeInSeconds ();
	
	#endif
	
	}