← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-dev/yade/trunk] Rev 1748: Some forgotten tasks

 

------------------------------------------------------------
revno: 1748
committer: Vincent Richefeu <richefeu@macbook-pro-de-vincent-richefeu.local>
branch nick: trunk
timestamp: Fri 2009-08-28 15:23:39 +0200
message:
  Some forgotten tasks
modified:
  SConstruct
  core/Timing.hpp


--
lp:yade
https://code.launchpad.net/~yade-dev/yade/trunk

Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-dev/yade/trunk/+edit-subscription.
=== modified file 'SConstruct'
--- SConstruct	2009-08-28 13:01:10 +0000
+++ SConstruct	2009-08-28 13:23:39 +0000
@@ -145,7 +145,6 @@
 	('CPPPATH', 'Additional paths for the C preprocessor (whitespace separated)',None,None,Split),
 	('LIBPATH','Additional paths for the linker (whitespace separated)',None,None,Split),
 	('QTDIR','Directories where to look for qt3',['/usr/share/qt3','/usr/lib/qt','/usr/lib/qt3','/usr/qt/3','/usr/lib/qt-3.3'],None,Split),
-	#('CXX','The c++ compiler','g++-4.2'),# FIXME, VR sorry for macosx port 
 	('CXX','The c++ compiler','g++'),
 	('CXXFLAGS','Additional compiler flags for compilation (like -march=core2).',None,None,Split),
 	('march','Architecture to use with -march=... when optimizing','native',None,None),
@@ -330,7 +329,7 @@
 	# check "optional" libs
 	if 'opengl' in env['features']:
 		ok=conf.CheckLibWithHeader('glut','GL/glut.h','c++','glutGetModifiers();',autoadd=1)
-		#if not ok: ok=conf.CheckLibWithHeader('glut','GLUT/glut.h','c++','glutGetModifiers();',autoadd=1)
+		# TODO ok=True for darwin platform where openGL (and glut) is native
 		if not ok: featureNotOK('opengl')
 	if 'gts' in env['features']:
 		env.ParseConfig('pkg-config glib-2.0 --cflags --libs');

=== modified file 'core/Timing.hpp'
--- core/Timing.hpp	2009-08-28 13:01:10 +0000
+++ core/Timing.hpp	2009-08-28 13:23:39 +0000
@@ -7,13 +7,16 @@
 	long nExec;
 	delta nsec;
 	TimingInfo():nExec(0),nsec(0){}
-	static delta getNow(bool evenIfDisabled=false){ 
-		if(!enabled && !evenIfDisabled) return 0L; struct timespec ts; 
+	static delta getNow(bool evenIfDisabled=false)
+	{ 
 #ifdef __APPLE__
+		std::cerr << "Warning: Time profiling should not be performed." << std::endl;
+		return 0L;
 #else
+		if(!enabled && !evenIfDisabled) return 0L; struct timespec ts; 
 		clock_gettime(CLOCK_MONOTONIC,&ts); 
+		return delta(1e9*ts.tv_sec+ts.tv_nsec);		
 #endif
-		return delta(1e9*ts.tv_sec+ts.tv_nsec);
 	}
 	static bool enabled;
 };