LeechCraft
0.6.70-16373-g319c272718
Modular cross-platform feature rich live environment.
timer.cpp
Go to the documentation of this file.
1
/**********************************************************************
2
* LeechCraft - modular cross-platform feature rich internet client.
3
* Copyright (C) 2006-2014 Georg Rudoy
4
*
5
* Distributed under the Boost Software License, Version 1.0.
6
* (See accompanying file LICENSE or copy at https://www.boost.org/LICENSE_1_0.txt)
7
**********************************************************************/
8
9
#include "
timer.h
"
10
#include <QTimer>
11
12
namespace
LC::Util::detail
13
{
14
bool
TimerAwaiter::await_ready
() const
noexcept
15
{
16
return
false
;
17
}
18
19
void
TimerAwaiter::await_suspend
(std::coroutine_handle<> handle)
noexcept
20
{
21
QTimer::singleShot (Duration_, handle);
22
}
23
24
void
TimerAwaiter::await_resume
() const
noexcept
25
{
26
}
27
}
28
29
namespace
LC
30
{
31
Util::detail::TimerAwaiter
operator
co_await (std::chrono::milliseconds duration)
32
{
33
return
Util::detail::TimerAwaiter
{ duration, Qt::CoarseTimer };
34
}
35
}
LC::Util::detail::TimerAwaiter::await_ready
bool await_ready() const noexcept
Definition:
timer.cpp:14
LC::Util::detail::TimerAwaiter
Definition:
timer.h:20
timer.h
LC::Util::detail::TimerAwaiter::await_resume
void await_resume() const noexcept
Definition:
timer.cpp:24
LC::Util::detail::TimerAwaiter::await_suspend
void await_suspend(std::coroutine_handle<> handle) noexcept
Definition:
timer.cpp:19
LC::Util::noexcept
auto Tup2 &&tup2 noexcept
Definition:
ctstringutils.h:41
LC::Util::detail
Definition:
fancytrayiconfreedesktop.cpp:23
LC
src
util
threads
coro
timer.cpp
Generated by
1.8.14