MCPcopy Create free account
hub / github.com/NativeScript/SimDeck / xcw_native_run_main_loop_slice

Function xcw_native_run_main_loop_slice

packages/server/native_stubs.c:68–83  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66void xcw_native_initialize_app(void) {}
67
68void xcw_native_run_main_loop_slice(double duration_seconds) {
69 if (duration_seconds <= 0.0) {
70 return;
71 }
72#ifdef _WIN32
73 Sleep((DWORD)(duration_seconds * 1000.0));
74#else
75 time_t seconds = (time_t)duration_seconds;
76 long nanos = (long)((duration_seconds - (double)seconds) * 1000000000.0);
77 if (nanos < 0) {
78 nanos = 0;
79 }
80 struct timespec delay = {.tv_sec = seconds, .tv_nsec = nanos};
81 nanosleep(&delay, NULL);
82#endif
83}
84
85char *simdeck_camera_list_webcams_json(char **error_message) {
86 (void)error_message;

Callers 1

serve_with_appkitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected