Mercurial > wgsdk
comparison src/utils.c @ 10:42ac054c0231
*: huge refactoring
dirtools now uses wchar (wayyy overdue)
the timer doesn't have a stupid design anymore
we don't use windows.h at all now
...
author | Paper <paper@paper.us.eu.org> |
---|---|
date | Sun, 11 Feb 2024 19:43:31 -0500 |
parents | 07f0e2f43204 |
children | e6a594f16403 |
comparison
equal
deleted
inserted
replaced
9:07f0e2f43204 | 10:42ac054c0231 |
---|---|
1 /** | 1 /** |
2 * utils.c: | 2 * utils.c: |
3 * | 3 * |
4 * Useful utilities for general use. | 4 * Useful utilities for general use. |
5 **/ | 5 **/ |
6 #ifndef WIN32_LEAN_AND_MEAN | 6 #include "utils.h" |
7 # define WIN32_LEAN_AND_MEAN | 7 |
8 #endif | 8 #include <sysinfoapi.h> |
9 #include <windows.h> | |
10 #include <stdint.h> | 9 #include <stdint.h> |
11 | 10 |
12 uint64_t get_system_time_in_milliseconds(void) { | 11 uint64_t get_system_time_in_milliseconds(void) { |
13 FILETIME ft; | 12 FILETIME ft; |
14 GetSystemTimeAsFileTime(&ft); | 13 GetSystemTimeAsFileTime(&ft); |