Skip to content

Commit

Permalink
Applied @kg's changes from #85660.
Browse files Browse the repository at this point in the history
  • Loading branch information
ilonatommy committed May 5, 2023
1 parent 423669e commit c535d5e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/mono/mono/utils/mono-os-mutex.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

#if !defined(HOST_WIN32)

#if !defined(CLOCK_MONOTONIC) || defined(HOST_DARWIN) || defined(HOST_WASM)
#if !defined(CLOCK_MONOTONIC) || defined(HOST_DARWIN) || defined(HOST_WASI)
#define BROKEN_CLOCK_SOURCE
#endif

Expand Down
5 changes: 3 additions & 2 deletions src/mono/mono/utils/mono-time.c
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,10 @@ gint64
mono_msec_boottime (void)
{
/* clock_gettime () is found by configure on Apple builds, but its only present from ios 10, macos 10.12, tvos 10 and watchos 3 */
#if !defined (TARGET_WASM) && ((defined(HAVE_CLOCK_MONOTONIC_COARSE) || defined(HAVE_CLOCK_MONOTONIC)) && !(defined(TARGET_IOS) || defined(TARGET_OSX) || defined(TARGET_WATCHOS) || defined(TARGET_TVOS)))
#if ((defined(HAVE_CLOCK_MONOTONIC_COARSE) || defined(HAVE_CLOCK_MONOTONIC)) && !(defined(TARGET_IOS) || defined(TARGET_OSX) || defined(TARGET_WATCHOS) || defined(TARGET_TVOS)))
clockid_t clockType =
#if HAVE_CLOCK_MONOTONIC_COARSE
/* emscripten exposes CLOCK_MONOTONIC_COARSE but doesn't implement it */
#if defined(HAVE_CLOCK_MONOTONIC_COARSE) && !defined(TARGET_WASM)
CLOCK_MONOTONIC_COARSE; /* good enough resolution, fastest speed */
#else
CLOCK_MONOTONIC;
Expand Down

0 comments on commit c535d5e

Please sign in to comment.