WUT
0.1
Wii U Toolchain
Main Page
Modules
Data Structures
Files
File List
Globals
include
coreinit
time.h
Go to the documentation of this file.
1
#pragma once
2
#include <
wut.h
>
3
10
#ifdef __cplusplus
11
extern
"C"
{
12
#endif
13
14
typedef
struct
OSCalendarTime
OSCalendarTime
;
15
16
typedef
int32_t
OSTick
;
17
typedef
int64_t
OSTime
;
18
19
struct
OSCalendarTime
20
{
21
int32_t
tm_sec
;
22
int32_t
tm_min
;
23
int32_t
tm_hour
;
24
int32_t
tm_mday
;
25
int32_t
tm_mon
;
26
int32_t
tm_year
;
27
};
28
CHECK_OFFSET(
OSCalendarTime
, 0x00, tm_sec);
29
CHECK_OFFSET(
OSCalendarTime
, 0x04, tm_min);
30
CHECK_OFFSET(
OSCalendarTime
, 0x08, tm_hour);
31
CHECK_OFFSET(
OSCalendarTime
, 0x0C, tm_mday);
32
CHECK_OFFSET(
OSCalendarTime
, 0x10, tm_mon);
33
CHECK_OFFSET(
OSCalendarTime
, 0x14, tm_year);
34
CHECK_SIZE(
OSCalendarTime
, 0x18);
35
36
#define OSOneSecond ((OSGetSystemInfo()->clockSpeed) / 4)
37
#define OSMilliseconds(val) ((((uint64_t)(val)) * (uint64_t)(OSOneSecond)) / 1000ull)
38
#define OSMicroseconds(val) ((((uint64_t)(val)) * (uint64_t)(OSOneSecond)) / 1000000ull)
39
#define OSNanoseconds(val) ((((uint64_t)(val)) * (uint64_t)(OSOneSecond)) / 1000000000ull)
40
41
OSTime
42
OSGetTime
();
43
44
OSTime
45
OSGetSystemTime
();
46
47
OSTick
48
OSGetTick
();
49
50
OSTick
51
OSGetSystemTick
();
52
53
OSTime
54
OSCalendarTimeToTicks
(
OSCalendarTime
*calendarTime);
55
56
void
57
OSTicksToCalendarTime
(OSTime time,
58
OSCalendarTime
*calendarTime);
59
60
#ifdef __cplusplus
61
}
62
#endif
63
OSGetTick
OSTick OSGetTick()
OSTime
int64_t OSTime
Definition:
time.h:17
OSCalendarTime::tm_sec
int32_t tm_sec
Definition:
time.h:21
OSCalendarTime::tm_hour
int32_t tm_hour
Definition:
time.h:23
OSCalendarTimeToTicks
OSTime OSCalendarTimeToTicks(OSCalendarTime *calendarTime)
OSCalendarTime::tm_mday
int32_t tm_mday
Definition:
time.h:24
OSGetTime
OSTime OSGetTime()
OSTicksToCalendarTime
void OSTicksToCalendarTime(OSTime time, OSCalendarTime *calendarTime)
OSGetSystemTick
OSTick OSGetSystemTick()
wut.h
OSCalendarTime::tm_min
int32_t tm_min
Definition:
time.h:22
OSGetSystemTime
OSTime OSGetSystemTime()
OSCalendarTime
Definition:
time.h:19
OSTick
int32_t OSTick
Definition:
time.h:16
OSCalendarTime::tm_mon
int32_t tm_mon
Definition:
time.h:25
OSCalendarTime::tm_year
int32_t tm_year
Definition:
time.h:26
Generated by
1.8.10