00001 ////////////////////////////////////////////////////////////////////// 00002 // Copyright (c) 2001-2002 David Pritchard <drpritch@alumni.uwaterloo.ca> 00003 // 00004 // This program is free software; you can redistribute it and/or 00005 // modify it under the terms of the GNU Lesser General Public License 00006 // as published by the Free Software Foundation; either 00007 // version 2 of the License, or (at your option) any later 00008 // version. 00009 // 00010 // This program is distributed in the hope that it will be useful, 00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 // GNU Lesser General Public License for more details. 00014 // 00015 // You should have received a copy of the GNU Lesser General Public License 00016 // along with this program; if not, write to the Free Software 00017 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00018 00019 #include <freecloth/base/baTime.h> 00020 #include <freecloth/base/windows.h> 00021 #include <freecloth/base/debug.h> 00022 00023 FREECLOTH_NAMESPACE_START 00024 00025 //////////////////////////////////////////////////////////////////////////////// 00026 // CLASS BaTime 00027 00028 //------------------------------------------------------------------------------ 00029 00030 BaTime::Instant BaTime::getTime() 00031 { 00032 return ::timeGetTime(); 00033 } 00034 00035 //------------------------------------------------------------------------------ 00036 00037 BaTime::Duration BaTime::getDuration( Instant start, Instant end ) 00038 { 00039 DGFX_ASSERT( end >= start ); 00040 return end - start; 00041 } 00042 00043 FREECLOTH_NAMESPACE_END