[Assorted-commits] SF.net SVN: assorted:[1489] cpp-commons/trunk/src/commons/time.h
Brought to you by:
yangzhang
From: <yan...@us...> - 2009-10-14 18:05:20
|
Revision: 1489 http://assorted.svn.sourceforge.net/assorted/?rev=1489&view=rev Author: yangzhang Date: 2009-10-14 18:05:13 +0000 (Wed, 14 Oct 2009) Log Message: ----------- added timed() macro Modified Paths: -------------- cpp-commons/trunk/src/commons/time.h Modified: cpp-commons/trunk/src/commons/time.h =================================================================== --- cpp-commons/trunk/src/commons/time.h 2009-10-14 18:04:49 UTC (rev 1488) +++ cpp-commons/trunk/src/commons/time.h 2009-10-14 18:05:13 UTC (rev 1489) @@ -45,6 +45,13 @@ long long start, last; }; +#define timed(label, stmt) \ + do { \ + timer t(label); \ + stmt; \ + t.print(); \ + } while (0); + } #endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |