Age | Commit message (Collapse) | Author |
|
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 *
|
|
Based on #5699. Closes #5699.
|
|
By making the Time constructor constexpr we can optimize creating a
Time instance from hardcoded values.
Also add more functions to convert between Time and various time units.
|
|
Since we tell the compiler to provide a default constructor we
need to initialize the member variables.
|
|
|
|
This adds a bunch of code in the hope that other, wrong code can be deleted.
Related to #5315.
|
|
|
|
The coarse clocks in time.h are a linux extension that we've adopted.
MacOS and the BSDs don't have it, so we need an alias in a platform
header for Lagom builds.
|
|
|
|
The implementation in LibC did a timestamp->day-of-week conversion
which looks like a valuable thing to have. But we only need it in
time_to_tm, where we already computed year/month/day -- so let's
consolidate on the day_of_week function in DateTime (which is
getting extracted to AK).
|
|
|
|
|
|
The JS tests pointed out that the implementation in DateTime
had an off-by-one in the month when doing the leap year check,
so this change fixes that bug.
|
|
I believe the implementation in RTC.cpp had an off-by-one
in the year passed to is_leap_year(). If that's true, then this
fixes that too.
|
|
|
|
|
|
tv_usec and tv_nsec should always be less than one second.
|
|
|
|
Add the ability to easily convert between timeval and timespec.
|
|
As suggested by Joshua, this commit adds the 2-clause BSD license as a
comment block to the top of every source file.
For the first pass, I've just added myself for simplicity. I encourage
everyone to add themselves as copyright holders of any file they've
added or modified in some significant way. If I've added myself in
error somewhere, feel free to replace it with the appropriate copyright
holder instead.
Going forward, all new source files should include a license header.
|
|
|
|
|
|
The scheduler expects m_select_timeout to act as a deadline. That is, it
should contain the time that a task should wake at -- but we were
directly copying the time from userspace, which meant that it always
returned virtually immediately.
At the same time, fix CEventLoop to not rely on the broken select behavior
by subtracting the current time from the time of the nearest timer.
|