Sam Atkins
6edc0cf5ab
LibCore+Userland: Don't auto-start new Core::Timers
...
This was unintuitive, and only useful in a few cases. In the majority,
users had to immediately call `stop()`, and several who did want the
timer started would call `start()` on it immediately anyway. Case in
point: There are only two places I had to add a manual `start()`.
2023-01-12 11:25:51 +01:00
Sam Atkins
a8cf0c9371
LibCore+Userland: Make Core::Timer::create_single_shot() return ErrorOr
...
clang-format sure has some interesting opinions about where to put a
method call that comes after a lambda. :thonk:
2023-01-12 11:25:51 +01:00
Sam Atkins
a15d44f019
LibCore+Userland: Make Core::Timer::create_repeating() return ErrorOr
...
The FIXMEs must flow!
2023-01-12 11:25:51 +01:00
Lenny Maiorani
ea58b8d927
Libraries: Use default constructors/destructors in LibCore
...
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#cother-other-default-operation-rules
"The compiler is more likely to get the default semantics right and
you cannot implement these functions better than the compiler."
2022-03-10 18:04:26 -08:00
Andreas Kling
d0df249666
LibCore: Add Core::Timer::set_active(bool)
...
This calls either start() or stop() depending on the boolean argument.
2021-12-25 14:20:13 +01:00
sin-ack
ae9e352104
LibCore: Add unit to Core::Timer interval arguments
...
This patch adds the _ms suffix to the interval arguments in Core::Timer,
to make it a little clearer what the interval unit is to others.
2021-05-12 22:38:20 +02:00
Andreas Kling
b91c49364d
AK: Rename adopt() to adopt_ref()
...
This makes it more symmetrical with adopt_own() (which is used to
create a NonnullOwnPtr from the result of a naked new.)
2021-04-23 16:46:57 +02:00
Brian Gianforcaro
1682f0b760
Everything: Move to SPDX license identifiers in all files.
...
SPDX License Identifiers are a more compact / standardized
way of representing file license information.
See: https://spdx.dev/resources/use/#identifiers
This was done with the `ambr` search and replace tool.
ambr --no-parent-ignore --key-from-file --rep-from-file key.txt rep.txt *
2021-04-22 11:22:27 +02:00
Tom
7269e0f751
LibCore: Add Timer::create_repeating convenience method
2021-03-28 20:42:21 +02:00
Andreas Kling
13d7c09125
Libraries: Move to Userland/Libraries/
2021-01-12 12:17:46 +01:00