WUT  0.1
Wii U Toolchain
systeminfo.h
Go to the documentation of this file.
1 #pragma once
2 #include <wut.h>
3 #include "time.h"
4 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15 typedef struct OSSystemInfo OSSystemInfo;
16 
18 {
19  uint32_t clockSpeed;
20  UNKNOWN(0x4);
22  UNKNOWN(0x10);
23 };
24 CHECK_OFFSET(OSSystemInfo, 0x0, clockSpeed);
25 CHECK_OFFSET(OSSystemInfo, 0x8, baseTime);
26 CHECK_SIZE(OSSystemInfo, 0x20);
27 
28 
29 #define OSOneSecond ((OSGetSystemInfo()->clockSpeed) / 4)
30 #define OSMilliseconds(val) ((((uint64_t)(val)) * (uint64_t)(OSOneSecond)) / 1000ull)
31 
34 
35 #ifdef __cplusplus
36 }
37 #endif
38 
OSSystemInfo * OSGetSystemInfo()
int64_t OSTime
Definition: time.h:17
uint32_t clockSpeed
Definition: systeminfo.h:19
OSTime baseTime
Definition: systeminfo.h:21