summaryrefslogtreecommitdiff
path: root/src/core/hle/kernel/timer.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/hle/kernel/timer.h')
-rw-r--r--src/core/hle/kernel/timer.h47
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
12namespace Kernel {
13
14/**
15 * Cancels a timer
16 * @param handle Handle of the timer to cancel
17 */
18ResultCode 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 */
26ResultCode SetTimer(Handle handle, s64 initial, s64 interval);
27
28/**
29 * Clears a timer
30 * @param handle Handle of the timer to clear
31 */
32ResultCode 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 */
41ResultCode CreateTimer(Handle* handle, const ResetType reset_type, const std::string& name="Unknown");
42
43/// Initializes the required variables for timers
44void TimersInit();
45/// Tears down the timer variables
46void TimersShutdown();
47} // namespace