Diol can save your theme preference in this browser using local storage.
EsHandle EsEventCreate(bool autoReset);
Creates an event. Returns a handle, or ES_INVALID_HANDLE on failure. Close with EsHandleClose.
void EsEventReset(EsHandle event);
Sets the event to the non-signalled state.
void EsEventSet(EsHandle event);
Signals the event, waking up waiting threads.
void EsMutexAcquire(EsMutex *mutex);
Locks the mutex. Blocks until the mutex is free.
void EsMutexDestroy(EsMutex *mutex);
Frees the resources of an unlocked mutex.
void EsMutexRelease(EsMutex *mutex);
Unlocks the mutex. Panics if it is not locked.
void EsSchedulerYield();
Gives up the rest of the current time slice.
void EsSpinlockAcquire(EsSpinlock *spinlock);
Locks a spinlock, busy-waiting until it is free.
void EsSpinlockRelease(EsSpinlock *spinlock);
Unlocks a spinlock. Panics if it is not locked.
EsTimer EsTimerSet(uint64_t afterMs, EsTimerCallback callback, EsGeneric argument);
Runs the callback after the given number of milliseconds. Returns a timer ID, or 0 on failure. Cancel with EsTimerCancel.
void EsTimerCancel(EsTimer id);
Cancels a timer created with EsTimerSet.
void EsSleep(uint64_t milliseconds);
Blocks the calling thread for the given number of milliseconds.
uintptr_t EsWait(const EsHandle *objects, size_t objectCount, uintptr_t timeoutMs);
Blocks until one of the objects is signalled or the timeout expires. Objects can be events, processes, or threads. Returns the index of the signalled object, or ES_ERROR_TIMEOUT_REACHED on timeout.
double EsTimeStampMs();
Current value of the performance timer, in ms.
void EsDateNowUTC(EsDateComponents *date);
Don't rely on the accuracy of the millisecond field.