diff options
author | stijn <stinos@zoho.com> | 2014-05-08 10:56:33 +0200 |
---|---|---|
committer | stijn <stinos@zoho.com> | 2014-05-09 13:58:15 +0200 |
commit | 5ed284a15e028e0435f3b6e0773e14225d8f165d (patch) | |
tree | b83683ee2d84e423cc00cf630ebb688430a119c4 /windows/init.c | |
parent | d25cba4f642e50e2f713b48f5f079036b352f72d (diff) | |
download | micropython-5ed284a15e028e0435f3b6e0773e14225d8f165d.tar.gz micropython-5ed284a15e028e0435f3b6e0773e14225d8f165d.zip |
windows: Add modtime implementation
Diffstat (limited to 'windows/init.c')
-rw-r--r-- | windows/init.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/windows/init.c b/windows/init.c index 5bb29b8f38..69f1026bb2 100644 --- a/windows/init.c +++ b/windows/init.c @@ -26,11 +26,21 @@ #include <stdlib.h> #include <stdio.h> +#include <Windows.h> + +HANDLE hSleepEvent = NULL; void init() { + hSleepEvent = CreateEvent(NULL, TRUE, FALSE, FALSE); #ifdef __MINGW32__ putenv("PRINTF_EXPONENT_DIGITS=2"); #else _set_output_format(_TWO_DIGIT_EXPONENT); #endif } + +void deinit() { + if (hSleepEvent != NULL) { + CloseHandle(hSleepEvent); + } +} |