00001 /*************************************************************************** 00002 LOW_platformMisc_Linux.h - description 00003 ------------------- 00004 begin : Thu Aug 1 2002 00005 copyright : (C) 2002 by Harald Roelle 00006 email : roelle@informatik.uni-muenchen.de 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #ifndef LOW_PLATFORMMISC_LINUX_H 00019 #define LOW_PLATFORMMISC_LINUX_H 00020 00021 00022 #include "LOW_platformMisc.h" 00023 00024 00025 /** Platform specific miscelanious for Linux platforms. 00026 00027 This class is thread-safe. 00028 00029 @author Harald Roelle 00030 */ 00031 class LOW_platformMisc_Linux : public LOW_platformMisc { 00032 00033 //======================================================================================= 00034 public: 00035 00036 //===================================================================================== 00037 // 00038 // constructors 00039 // 00040 00041 /** Destructor. 00042 */ 00043 virtual ~LOW_platformMisc_Linux(); 00044 00045 00046 //===================================================================================== 00047 // 00048 // methods 00049 // 00050 00051 void const p_secSleep( const unsigned int inSeconds) const; 00052 void const p_milliSleep( const unsigned long inMilliSeconds) const; 00053 void const p_microSleep( const unsigned long inMicroSeconds) const; 00054 void const p_nanoSleep( const unsigned long inNanoSeconds) const; 00055 void const p_nanoSleep( const unsigned int inSeconds, const unsigned long inNanoSeconds) const; 00056 00057 void const p_getTimestamp( LOW_platformMisc::timestamp_t &outTimestamp) const; 00058 00059 LOW_platformMiscFactory::threadIdent_t const p_getThreadID() const; 00060 00061 std::string const p_getHostname() const; 00062 00063 00064 //======================================================================================= 00065 protected: 00066 00067 00068 00069 //===================================================================================== 00070 // 00071 // friend classes 00072 // 00073 00074 friend class LOW_platformMiscFactory; /**< To allow construction. */ 00075 00076 00077 //===================================================================================== 00078 // 00079 // constructors 00080 // 00081 00082 /** Constructor. 00083 Not publicly constructable. Use LOW_platformMiscFactory. 00084 */ 00085 LOW_platformMisc_Linux(); 00086 00087 }; 00088 00089 #endif