00001 /***************************************************************************** 00002 * Author: Vadim Zeitlin <vadim@wxwidgets.org> 00003 * 00004 ***************************************************************************** 00005 * Copyright (c) 2004 Vadim Zeitlin 00006 * 00007 * This library is free software; you can distribute it and/or modify it under 00008 * the terms of the GNU Lesser General Public License (LGPL), as published by 00009 * the Free Software Foundation; either version 2.1 of the License, or (at your 00010 * option) any later version. 00011 * 00012 * This library is distributed in the hope that it will be useful, but WITHOUT 00013 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00014 * FITNESS FOR A PARTICULAR PURPOSE. See the LGPL in the file COPYING for more 00015 * details. 00016 * 00017 */ 00018 00019 #ifndef _rlog_time_incl 00020 #define _rlog_time_incl 00021 00022 #include <rlog/common.h> 00023 00028 #ifdef _WIN32 00029 00030 typedef __int64 rlog_time_interval; 00031 typedef LARGE_INTEGER rlog_time; 00032 00033 void sleep(int seconds); 00034 #else 00035 00036 #include <stdint.h> 00037 #include <sys/time.h> 00038 #include <unistd.h> // for sleep() 00039 00040 typedef timeval rlog_time; 00041 typedef int64_t rlog_time_interval; 00042 00043 #endif 00044 00045 void rlog_get_time(rlog_time *pt); 00046 rlog_time_interval rlog_time_diff( const rlog_time &end, const rlog_time &start ); 00047 00048 const char *rlog_time_unit(); 00049 00050 #endif // _rlog_time_incl
1.5.6