Skip to content

Commit

Permalink
win warn fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
tmori committed Dec 29, 2024
1 parent 9018d6f commit 6baf758
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/hello_world/src/hello_world.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <stdio.h>
#include <stdlib.h>
#ifdef _WIN32
#include <windows.h>
static inline void usleep(long microseconds) {
Sleep(microseconds / 1000);
}
Expand All @@ -12,6 +13,7 @@ static inline void usleep(long microseconds) {

static int my_on_initialize(hako_asset_context_t* context)
{
(void)context;
printf("INFO: my_on_initialize enter\n");
printf("INFO: sleep 1sec\n");
usleep(1000*1000);
Expand All @@ -20,6 +22,7 @@ static int my_on_initialize(hako_asset_context_t* context)
}
static int my_on_reset(hako_asset_context_t* context)
{
(void)context;
printf("INFO: my_on_reset enter\n");
printf("INFO: sleep 1sec\n");
usleep(1000*1000);
Expand All @@ -28,6 +31,7 @@ static int my_on_reset(hako_asset_context_t* context)
}
static int my_on_simulation_step(hako_asset_context_t* context)
{
(void)context;
printf("INFO: on_simulation_step enter: %llu\n", hako_asset_simulation_time());
printf("INFO: sleep 1sec\n");
usleep(1000*1000);
Expand All @@ -36,6 +40,7 @@ static int my_on_simulation_step(hako_asset_context_t* context)
}
static int my_on_manual_timing_control(hako_asset_context_t* context)
{
(void)context;
printf("INFO: on_manual_timing_control enter\n");
int result = 0;
while (result == 0) {
Expand Down

0 comments on commit 6baf758

Please sign in to comment.