remove deprecated code
This commit is contained in:
parent
a08e274088
commit
b9ab3f8a4f
@ -40,16 +40,7 @@ namespace nana
|
|||||||
timer& operator=(timer&&) = delete;
|
timer& operator=(timer&&) = delete;
|
||||||
public:
|
public:
|
||||||
timer();
|
timer();
|
||||||
#if 0 //deprecated
|
|
||||||
[[deprecated("prefer a std::chrono::duration (like std::chrono::milliseconds) over "
|
|
||||||
"raw integers for durations")]]
|
|
||||||
timer(unsigned int ms) : timer{} { interval_(ms); } /// Accepts an initial interval in ms
|
|
||||||
|
|
||||||
template <typename Rep, typename Period> /// Accepts an initial interval in any chrono unit
|
|
||||||
explicit timer(std::chrono::duration<Rep, Period> const & time) : timer{} { interval(time); }
|
|
||||||
#else
|
|
||||||
explicit timer(std::chrono::milliseconds ms);
|
explicit timer(std::chrono::milliseconds ms);
|
||||||
#endif
|
|
||||||
~timer();
|
~timer();
|
||||||
|
|
||||||
template<typename Function>
|
template<typename Function>
|
||||||
@ -63,23 +54,8 @@ namespace nana
|
|||||||
bool started() const;
|
bool started() const;
|
||||||
void stop();
|
void stop();
|
||||||
|
|
||||||
#if 0 //deprecated
|
|
||||||
[[deprecated("prefer a std::chrono::duration (like std::chrono::milliseconds) over "
|
|
||||||
"raw integers for durations")]]
|
|
||||||
inline void interval(unsigned milliseconds) { interval_(milliseconds); }
|
|
||||||
|
|
||||||
template <typename Rep, typename Period>
|
|
||||||
inline void interval(std::chrono::duration<Rep, Period> const & time_interval) ///< Set the duration between calls, accepts std::chrono
|
|
||||||
{
|
|
||||||
_m_interval(static_cast<unsigned>(std::chrono::duration_cast<std::chrono::milliseconds>(time_interval).count()));
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
void interval(std::chrono::milliseconds ms);
|
void interval(std::chrono::milliseconds ms);
|
||||||
#endif
|
|
||||||
|
|
||||||
#if 0 //deprecated
|
|
||||||
unsigned interval() const;
|
|
||||||
#endif
|
|
||||||
template <typename Duration = std::chrono::milliseconds>
|
template <typename Duration = std::chrono::milliseconds>
|
||||||
inline Duration interval() const
|
inline Duration interval() const
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user