2024-02-23 22:32:32 +01:00
|
|
|
// SPDX-FileCopyrightText: Copyright 2024 shadPS4 Emulator Project
|
|
|
|
// SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
2023-10-30 07:48:52 +01:00
|
|
|
#pragma once
|
|
|
|
|
2023-11-05 12:41:10 +01:00
|
|
|
#include "common/types.h"
|
2023-11-06 00:11:54 +01:00
|
|
|
|
|
|
|
namespace Core::Loader {
|
|
|
|
class SymbolsResolver;
|
|
|
|
}
|
2023-10-30 07:48:52 +01:00
|
|
|
|
2024-04-13 23:35:48 +02:00
|
|
|
namespace Libraries::Kernel {
|
2023-11-06 00:11:54 +01:00
|
|
|
|
2024-06-10 21:59:12 +02:00
|
|
|
struct OrbisKernelTimeval {
|
|
|
|
s64 tv_sec;
|
|
|
|
s64 tv_usec;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct OrbisKernelTimezone {
|
|
|
|
s32 tz_minuteswest;
|
|
|
|
s32 tz_dsttime;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct OrbisKernelTimespec {
|
|
|
|
s64 tv_sec;
|
|
|
|
s64 tv_nsec;
|
|
|
|
};
|
|
|
|
|
2024-06-14 09:37:26 +02:00
|
|
|
constexpr int ORBIS_CLOCK_REALTIME = 0;
|
|
|
|
constexpr int ORBIS_CLOCK_VIRTUAL = 1;
|
|
|
|
constexpr int ORBIS_CLOCK_PROF = 2;
|
|
|
|
constexpr int ORBIS_CLOCK_MONOTONIC = 4;
|
|
|
|
constexpr int ORBIS_CLOCK_UPTIME = 5;
|
|
|
|
constexpr int ORBIS_CLOCK_UPTIME_PRECISE = 7;
|
|
|
|
constexpr int ORBIS_CLOCK_UPTIME_FAST = 8;
|
|
|
|
constexpr int ORBIS_CLOCK_REALTIME_PRECISE = 9;
|
|
|
|
constexpr int ORBIS_CLOCK_REALTIME_FAST = 10;
|
|
|
|
constexpr int ORBIS_CLOCK_MONOTONIC_PRECISE = 11;
|
|
|
|
constexpr int ORBIS_CLOCK_MONOTONIC_FAST = 12;
|
|
|
|
constexpr int ORBIS_CLOCK_SECOND = 13;
|
|
|
|
constexpr int ORBIS_CLOCK_THREAD_CPUTIME_ID = 14;
|
|
|
|
constexpr int ORBIS_CLOCK_PROCTIME = 15;
|
|
|
|
constexpr int ORBIS_CLOCK_EXT_NETWORK = 16;
|
|
|
|
constexpr int ORBIS_CLOCK_EXT_DEBUG_NETWORK = 17;
|
|
|
|
constexpr int ORBIS_CLOCK_EXT_AD_NETWORK = 18;
|
|
|
|
constexpr int ORBIS_CLOCK_EXT_RAW_NETWORK = 19;
|
|
|
|
|
2024-05-07 15:28:42 +02:00
|
|
|
u64 PS4_SYSV_ABI sceKernelGetTscFrequency();
|
2023-10-30 19:22:25 +01:00
|
|
|
u64 PS4_SYSV_ABI sceKernelGetProcessTime();
|
|
|
|
u64 PS4_SYSV_ABI sceKernelGetProcessTimeCounter();
|
|
|
|
u64 PS4_SYSV_ABI sceKernelGetProcessTimeCounterFrequency();
|
|
|
|
u64 PS4_SYSV_ABI sceKernelReadTsc();
|
2023-10-30 07:48:52 +01:00
|
|
|
|
2024-04-13 23:35:48 +02:00
|
|
|
void timeSymbolsRegister(Core::Loader::SymbolsResolver* sym);
|
2023-11-06 00:11:54 +01:00
|
|
|
|
2024-04-13 23:35:48 +02:00
|
|
|
} // namespace Libraries::Kernel
|