summaryrefslogtreecommitdiff
path: root/Kernel/Thread.h
diff options
context:
space:
mode:
authorkleines Filmröllchen <filmroellchen@serenityos.org>2023-03-13 16:30:34 +0100
committerJelle Raaijmakers <jelle@gmta.nl>2023-05-24 23:18:07 +0200
commit213025f210a785ca71b7659d7dc4f5dc3c030622 (patch)
treec255161bbb780822d4d5a21c3157303f905b781b /Kernel/Thread.h
parent82ddc813d52b8314f63c583a90953ae5ac607ffd (diff)
downloadserenity-213025f210a785ca71b7659d7dc4f5dc3c030622.zip
AK: Rename Time to Duration
That's what this class really is; in fact that's what the first line of the comment says it is. This commit does not rename the main files, since those will contain other time-related classes in a little bit.
Diffstat (limited to 'Kernel/Thread.h')
-rw-r--r--Kernel/Thread.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/Kernel/Thread.h b/Kernel/Thread.h
index 8e8b9d7d32..a13259e5e6 100644
--- a/Kernel/Thread.h
+++ b/Kernel/Thread.h
@@ -159,16 +159,16 @@ public:
: m_infinite(true)
{
}
- explicit BlockTimeout(bool is_absolute, Time const* time, Time const* start_time = nullptr, clockid_t clock_id = CLOCK_MONOTONIC_COARSE);
+ explicit BlockTimeout(bool is_absolute, Duration const* time, Duration const* start_time = nullptr, clockid_t clock_id = CLOCK_MONOTONIC_COARSE);
- Time const& absolute_time() const { return m_time; }
- Time const* start_time() const { return !m_infinite ? &m_start_time : nullptr; }
+ Duration const& absolute_time() const { return m_time; }
+ Duration const* start_time() const { return !m_infinite ? &m_start_time : nullptr; }
clockid_t clock_id() const { return m_clock_id; }
bool is_infinite() const { return m_infinite; }
private:
- Time m_time {};
- Time m_start_time {};
+ Duration m_time {};
+ Duration m_start_time {};
clockid_t m_clock_id { CLOCK_MONOTONIC_COARSE };
bool m_infinite { false };
};
@@ -559,7 +559,7 @@ public:
class SleepBlocker final : public Blocker {
public:
- explicit SleepBlocker(BlockTimeout const&, Time* = nullptr);
+ explicit SleepBlocker(BlockTimeout const&, Duration* = nullptr);
virtual StringView state_string() const override { return "Sleeping"sv; }
virtual Type blocker_type() const override { return Type::Sleep; }
virtual BlockTimeout const& override_timeout(BlockTimeout const&) override;
@@ -571,7 +571,7 @@ public:
void calculate_remaining();
BlockTimeout m_deadline;
- Time* m_remaining;
+ Duration* m_remaining;
};
class SelectBlocker final : public FileBlocker {
@@ -824,13 +824,13 @@ public:
return block<Thread::WaitQueueBlocker>(timeout, wait_queue, forward<Args>(args)...);
}
- BlockResult sleep(clockid_t, Time const&, Time* = nullptr);
- BlockResult sleep(Time const& duration, Time* remaining_time = nullptr)
+ BlockResult sleep(clockid_t, Duration const&, Duration* = nullptr);
+ BlockResult sleep(Duration const& duration, Duration* remaining_time = nullptr)
{
return sleep(CLOCK_MONOTONIC_COARSE, duration, remaining_time);
}
- BlockResult sleep_until(clockid_t, Time const&);
- BlockResult sleep_until(Time const& duration)
+ BlockResult sleep_until(clockid_t, Duration const&);
+ BlockResult sleep_until(Duration const& duration)
{
return sleep_until(CLOCK_MONOTONIC_COARSE, duration);
}