diff options
author | Subv <subv2112@gmail.com> | 2014-12-04 20:45:47 +0100 |
---|---|---|
committer | Subv <subv2112@gmail.com> | 2015-01-09 03:22:14 +0100 |
commit | 07044651ef2644451dc4f78045856ad078cb69fe (patch) | |
tree | 50113ade759854c60c0e91864f27f2f680993e84 /src/core/hle/kernel/timer.h | |
parent | Merge pull request #425 from Subv/coretiming (diff) | |
download | yuzu-07044651ef2644451dc4f78045856ad078cb69fe.tar yuzu-07044651ef2644451dc4f78045856ad078cb69fe.tar.gz yuzu-07044651ef2644451dc4f78045856ad078cb69fe.tar.bz2 yuzu-07044651ef2644451dc4f78045856ad078cb69fe.tar.lz yuzu-07044651ef2644451dc4f78045856ad078cb69fe.tar.xz yuzu-07044651ef2644451dc4f78045856ad078cb69fe.tar.zst yuzu-07044651ef2644451dc4f78045856ad078cb69fe.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/kernel/timer.h | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/src/core/hle/kernel/timer.h b/src/core/hle/kernel/timer.h new file mode 100644 index 000000000..f8aa66b60 --- /dev/null +++ b/src/core/hle/kernel/timer.h @@ -0,0 +1,47 @@ +// Copyright 2015 Citra Emulator Project +// Licensed under GPLv2 or any later version +// Refer to the license.txt file included. + +#pragma once + +#include "common/common_types.h" + +#include "core/hle/kernel/kernel.h" +#include "core/hle/svc.h" + +namespace Kernel { + +/** + * Cancels a timer + * @param handle Handle of the timer to cancel + */ +ResultCode CancelTimer(Handle handle); + +/** + * Starts a timer with the specified initial delay and interval + * @param handle Handle of the timer to start + * @param initial Delay until the timer is first fired + * @param interval Delay until the timer is fired after the first time + */ +ResultCode SetTimer(Handle handle, s64 initial, s64 interval); + +/** + * Clears a timer + * @param handle Handle of the timer to clear + */ +ResultCode ClearTimer(Handle handle); + +/** + * Creates a timer + * @param Handle to newly created Timer object + * @param reset_type ResetType describing how to create the timer + * @param name Optional name of timer + * @return ResultCode of the error + */ +ResultCode CreateTimer(Handle* handle, const ResetType reset_type, const std::string& name="Unknown"); + +/// Initializes the required variables for timers +void TimersInit(); +/// Tears down the timer variables +void TimersShutdown(); +} // namespace |