
New to Boost, want to find the following basic functions, please tell me where to find them: 1. sleep function; 2. get current working directory; 3. get current system time; 4. get file separator or directory separator; thanks, -- View this message in context: http://www.nabble.com/basic-functions-tp20803583p20803583.html Sent from the Boost - Users mailing list archive at Nabble.com.

1. sleep function;
Check out the Boost.Thread library. You can use the static function boost::thread::sleep to tell the current thread to sleep. http://www.boost.org/doc/libs/1_37_0/doc/html/thread/thread_management.html#...
2. get current working directory;
Check out the Boost.Filesystem library. Specifically, you probably want to look at boost::filesystem::initial_path or boost::filesystem::current_path. http://www.boost.org/doc/libs/1_37_0/libs/filesystem/doc/reference.html#Attr...
3. get current system time;
Check out the Boost.Date_Time library. You can construct a boost::posix_time::ptime object from boost::posix_time::second_clock::local_time http://www.boost.org/doc/libs/1_37_0/doc/html/date_time/posix_time.html#ptim...
4. get file separator or directory separator;
Check out the Boost.Filesystem library. You can use boost::filesystem::path and many related utility functions to portably compose and decompose paths. Additionally, you can retrieve the path string in a portable or system-specific format. http://www.boost.org/doc/libs/1_37_0/libs/filesystem/doc/index.htm Hope This Helps, Justin

KSpam wrote:
Hope This Helps,
They are what I am looking for. Thanks. The following sleep is in seconds or in milliseconds? namespace this_thread { void BOOST_THREAD_DECL yield(); void BOOST_THREAD_DECL sleep(system_time const& abs_time); template<typename TimeDuration> inline void sleep(TimeDuration const& rel_time) { this_thread::sleep(get_system_time()+rel_time); } } -- View this message in context: http://www.nabble.com/basic-functions-tp20803583p20813404.html Sent from the Boost - Users mailing list archive at Nabble.com.
participants (2)
-
boost001
-
KSpam