diff options
Diffstat (limited to 'src/core/hle/kernel/timer.h')
| -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 @@ | |||
| 1 | // Copyright 2015 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 or any later version | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include "common/common_types.h" | ||
| 8 | |||
| 9 | #include "core/hle/kernel/kernel.h" | ||
| 10 | #include "core/hle/svc.h" | ||
| 11 | |||
| 12 | namespace Kernel { | ||
| 13 | |||
| 14 | /** | ||
| 15 | * Cancels a timer | ||
| 16 | * @param handle Handle of the timer to cancel | ||
| 17 | */ | ||
| 18 | ResultCode CancelTimer(Handle handle); | ||
| 19 | |||
| 20 | /** | ||
| 21 | * Starts a timer with the specified initial delay and interval | ||
| 22 | * @param handle Handle of the timer to start | ||
| 23 | * @param initial Delay until the timer is first fired | ||
| 24 | * @param interval Delay until the timer is fired after the first time | ||
| 25 | */ | ||
| 26 | ResultCode SetTimer(Handle handle, s64 initial, s64 interval); | ||
| 27 | |||
| 28 | /** | ||
| 29 | * Clears a timer | ||
| 30 | * @param handle Handle of the timer to clear | ||
| 31 | */ | ||
| 32 | ResultCode ClearTimer(Handle handle); | ||
| 33 | |||
| 34 | /** | ||
| 35 | * Creates a timer | ||
| 36 | * @param Handle to newly created Timer object | ||
| 37 | * @param reset_type ResetType describing how to create the timer | ||
| 38 | * @param name Optional name of timer | ||
| 39 | * @return ResultCode of the error | ||
| 40 | */ | ||
| 41 | ResultCode CreateTimer(Handle* handle, const ResetType reset_type, const std::string& name="Unknown"); | ||
| 42 | |||
| 43 | /// Initializes the required variables for timers | ||
| 44 | void TimersInit(); | ||
| 45 | /// Tears down the timer variables | ||
| 46 | void TimersShutdown(); | ||
| 47 | } // namespace | ||