#ifndef THREAD_H_
#define THREAD_H_

#pragma message("'foundation/Thread.h' is deprecated. Use 'foundation/thread.hpp' instead.")

#include "foundation/thread.hpp"
#include "foundation/chrono.hpp"

namespace Tn {
    namespace Foundation {
        using tn::thread;
        namespace this_thread = tn::this_thread;
        namespace This_thread = tn::this_thread;

#if !TN_PLATFORM_WINCE
        namespace chrono = tn::chrono;
#endif

#if _TN_FOUNDATION_USE_STD
        typedef std::chrono::system_clock::time_point system_time;
#  define system_time_now() std::chrono::system_clock::now()
#  define system_time_milliseconds(duration) std::chrono::milliseconds((duration))
#  define SLEEP(duration) std::this_thread::sleep_for(std::chrono::milliseconds((duration)))
#else
        typedef boost::system_time system_time;
#  define system_time_now() boost::get_system_time()
#  define system_time_milliseconds(duration) boost::posix_time::milliseconds((duration))
#  define SLEEP(duration) boost::this_thread::sleep(boost::posix_time::milliseconds((duration)))
#endif
    }
}

#endif //!__THREAD_H__
