加一点点inline

This commit is contained in:
root 2024-05-11 10:34:09 +08:00
parent 4109905bc6
commit 4da9434d46

View File

@ -118,19 +118,19 @@ struct Scheduler {
Add(std::numeric_limits<u64>::max(), EventClass::EndOfQueue);
}
auto GetTimestampNow() const -> u64 {
auto ALWAYS_INLINE GetTimestampNow() const -> u64 {
return timestamp_now;
}
void SetTimestampNow(u64 timestamp) {
void ALWAYS_INLINE SetTimestampNow(u64 timestamp) {
timestamp_now = timestamp;
}
auto GetTimestampTarget() const -> u64 {
auto ALWAYS_INLINE GetTimestampTarget() const -> u64 {
return heap[0]->timestamp;
}
auto GetRemainingCycleCount() const -> int {
auto ALWAYS_INLINE GetRemainingCycleCount() const -> int {
return int(GetTimestampTarget() - GetTimestampNow());
}