mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 14:18:12 +00:00
LibCore: Add Core::Timer::create_single_shot()
This is just a convenience function for creating single-shot timers.
This commit is contained in:
parent
f813041f67
commit
a53cf81374
4 changed files with 33 additions and 35 deletions
|
@ -62,12 +62,9 @@ Document::Document()
|
|||
, m_style_resolver(make<StyleResolver>(*this))
|
||||
, m_window(Window::create_with_document(*this))
|
||||
{
|
||||
m_style_update_timer = Core::Timer::construct();
|
||||
m_style_update_timer->set_single_shot(true);
|
||||
m_style_update_timer->set_interval(0);
|
||||
m_style_update_timer->on_timeout = [this] {
|
||||
m_style_update_timer = Core::Timer::create_single_shot(0, [this] {
|
||||
update_style();
|
||||
};
|
||||
});
|
||||
}
|
||||
|
||||
Document::~Document()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue